You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christian Bjørnbak <bj...@iuas.dk> on 2001/04/24 11:44:09 UTC
Apache-Tomcat RewriteRule..
Hi
I trying to get requests to all non-existing files redirected to a servlet.
I'm using the following rule inspired by the "Apache 1.3 Url Rewriting
Guide":
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteLog /var/log/httpd/rewrite_log
RewriteLogLevel 2
RewriteCond /home/docroot/%{REQUEST_FILENAME} !-f
RewriteRule ^(.+) /servlet$1
</IfModule>
But this produces the following error in the Apache error log trying to
access the HelloWorldExample servlet (copied from examples to ROOT):
[<date and time>] [error] [client <ip>] File does not exist:
/home/docroot/servlet/HelloWorldExample
I'm loading the mod_jk module before the mod_rewrite module in httpd.conf.
Doesn't the mod_jk catch the rewrited path or does the /home/docroot part of
path do the damage?
How do I get rid of the /home/docroot part??
Thanks,
Christian Bjørnbak