Forum Moderators: phranque
I have a Directory set up like:
DocumentRoot "/Library/Tomcat/webapps/villas"
DirectoryIndex "index.htm"
<Directory "/Library/Tomcat/webapps/villas">
Options All -Indexes +ExecCGI +MultiViews
Allow from all
AllowOverride None
Order allow,deny
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine On
#These work
#RewriteRule ^/index.htm$ /bla.htm [L,PT]
RewriteRule ^/bla2.htm$ /bla.htm [L,PT]
RewriteRule ^/bla3.htm$ /sv/main?temp=short_list [L,PT]
#This doesn't work
RewriteRule ^/index.htm$ /sv/main?temp=short_list [L,PT]
RewriteLog /var/log/httpd/rewrite1.log
RewriteLogLevel 9
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
</IfModule>
What happens is that the first three work as expected, but the fourth does not: it gets 403 forbidden : the rewrite log says that the rewrite has happened, and if I directly hit the url that I am rewriting to then of course it works - so it seems that what I am rewriting to some how makes it 403, but it's not, because I can hit that URL directly. The third and fourth are pointing to servlets in Tomcat, but I don't think that can be relevant because I get Apache error log: Directory Index forbidden by rule and nothing in Tomcat access log. I'm very confused. Please help.
PS: Of course if I hit the index like [blabla...] then it works: it's just using it as [blabla...] that doesn't