Rewrite a dynamic jserve URL to a static one

New to mod_rewrite? This is a good place to start.

Rewrite a dynamic jserve URL to a static one

Postby theshz » Thu May 05, 2005 8:59 pm

Hi, I'm running Apache with Tomcat, and I've got most of my dynamic pages served from tomcat like:

http://www.foo.com/test/abc.jsp?a=test&b=4

and In my httpd.conf I have a section:
<Location "/test">
JkUriSet worker ajp13: localhost:8009
</Location>
This all works fine. But I'd like to be able to access the above url as

http://www.foo.com/abc.html

so I tried rewrite:
RewriteRule /abc.html /test/abc.jsp?a=test&b=4

It seems once this rule is applyed, apache started looking for the file $Docroot/test/abc.jsp, instead of passing it to tomcat. It seems to be a problem of the order of the rules: Rewrite vs. the Location. Is there a way to do this?

Thanks.

theshz
theshz
 

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 40 guests

cron