tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Bjørnbak <bjorn...@iuas.dk>
Subject Apache-Tomcat RewriteRule..
Date Tue, 24 Apr 2001 09:44:09 GMT
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

Mime
View raw message