You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ying lcs <yi...@gmail.com> on 2006/11/15 08:08:09 UTC

Using URL Rewrite Filter in tomcat 5.0.28

Running URL Rewrite Filter (http://tuckey.org/urlrewrite) in tomcat 5.0.28


I am using URL Rewrite Filter in my web app. It works fine in Tomcat
4.1.34, but when I deploy the same web app in 5.0.28, it does not
work.

Here is my rule:
        <rule >

           <from >^\?lang=([a-z]{2})$</from>
           <to type="redirect">%{context-path}/index_$1.html</to>
        </rule>

what I want to do this this:
rewrite
http://localhost:8080/testapp?lang=en
to
http://localhost:8080/testapp/index_en.html

It works on tomcat 4.1

But when i try to run the same thing in 5.0.28,
when i type this
http://localhost:8080/testapp?lang=en
it goes to
http://localhost:8080/testapp/?lang=en

I appreciate if anyone can help me with this problem.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org