Hi, I have istalled urlrewrite filter on my tomcat 5.5. The rewrite with the file urlrewrite.xml work, but I can’t configure the rewrite with the htaccess file…This is my files:
THE CODE THAT I ADD TO WEB.XML FILE ---------------------------------------------------------------------------------------------------------------------------------- <filter> <filter-name>UrlRewriteFilter</filter-name> <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class> <!-- defaults to false. use mod_rewrite style configuration file (if this is true and confPath is not specified confPath will be set to /WEB-INF/.htaccess) --> <init-param> <param-name>modRewriteConf</param-name> <param-value>true</param-value> </init-param> </filter> <filter-mapping> <filter-name>UrlRewriteFilter</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping> ---------------------------------------------------------------------------------------------------------------------------------- THE URLREWRITE FILE ---------------------------------------------------------------------------------------------------------------------------------- <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN" "http://tuckey.org/res/dtds/urlrewrite3.0.dtd"> <urlrewrite> <rule> <from>/dettaglioItinerario.do\?iditinerario=2</from> <to>/isole/ischia.html$1</to> </rule> <rule> <note>Esempio 1.2</note> <from>/getdocument_2\.jsp\?id=(\d+)</from> <to>/documents/index.jsp?docid=$1</to> </rule> <rule> <note>Esempio 1.3</note> <from>/documents/(\d+).html</from> <to>/documents/index.jsp?id=$1</to> </rule> <rule match-type="getQueryString()"> <from>^/iditinerario/([0-9]+)$</from> <to>/world.jsp</to> </rule> <rule> <from>/pagina.html</from> <to type="redirect-permanent">page2.html</to> </rule> </urlrewrite> ---------------------------------------------------------------------------------------------------------------------------------- THE HTACCESS FILE ---------------------------------------------------------------------------------------------------------------------------------- #Options FollowSymLinks Rewritengine on RewriteCond %{THE_REQUEST} ^.*/aia\.html RewriteRule ^(.*)test/aia.html$ http://prova.summersky.it/ischia/isola.html [R=301,L] RewriteCond %{QUERY_STRING} ^iditinerario=2$ RewriteRule ^tomcat/dettaglioItinerario.do(.*)$ http://prova.summersky.it/isole/procida.html [L] Redirect 301 /page.html http://prova.summersky.it/tomcat/dettaglioItinerario.do?iditinerario=2 ---------------------------------------------------------------------------------------------------------------------------------- Thank you in advance, Daniele -- View this message in context: http://www.nabble.com/problems-with-urlrewrite-filter-3.2.0-tp24967180p24967180.html Sent from the Tomcat - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org