mod_rewrite not working for virtual host nor .htaccess
I've been tearing my hair out trying to implement mod_rewrite on my Leopard Server. I have finally been able to get mod_rewrite to log what it does, but that has only shown that it DOES periodically respond to a /server_status request from the server itself, but any request to the virtual host (which is otherwise working) does not result in mod_rewrite being 'triggered.' I've tried all the usual suspects, in just about every permutation and combination:
1) .htaccess in all its guises and Override All;
2) RewriteEngine On;
3) http.conf, the virtual xxxx_80_virtualhostname.com.conf;
4) Options All -Includes -ExecCGI +MultiViews -Indexes +FollowSymlinks;
5) other less credible ideas gleaned from the Apple discussions and the web.
If I had to summarise the effect, it's that
a) mod_rewrite is on (as shown by the regular /server_status entries in the rewrite.log);
b) xxxx_80_virtualhostname.com.conf is read when the virtual host is turned on (because the site is active and can be turned off, at will);
c) any mod_rewrite and Options entries in the vistual host xxxx_80_virtualhostname.com.conf seem to be being studiously ignored, even though the .conf file is being read and used.
This part of http.conf is what seems to turn on the logging:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteLog /private/var/log/apache2/rewrite.log
RewriteLogLevel 9
</IfModule>
Here's the section of xxxx_80_virtualhostname.com.conf:
<Directory "/Library/WebServer/com.VirtualHostName">
AllowOverride All
<IfModule mod_dav.c>
DAV Off
</IfModule>
Options All -Includes -ExecCGI +MultiViews -Indexes +FollowSymlinks
</Directory>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteLog /private/var/log/apache2/rewrite.log
RewriteLogLevel 9
RewriteRule ^/Tom.html$ /Mary.html [R]
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteRule .* - [F]
</IfModule>
This is a variant of the .htaccess file:
RewriteEngine on
RewriteBase /
RewriteRule ^/Tom.html$ /MARY.html [R]
It makes no difference whether the RewriteBase is present in the .htaccess or the xxxx_80_virtualhostname.com.conf, or both.
No amount of pass-though [PT] or redirect [R] has any effect, either.
I do have Lasso 8.5 installed, but the developer says that Lasso should have no effect on the proper functioning of mod_rewrite.
mod_rewrite is working (i.e. it's on, as shown by the /server_status entries in the log and that the log is being updated), but it is also not working (in that no matter what I put into xxxx_80_virtualhostname.com.conf and/or .htaccess, there is no entry in the rewrite.log nor in the system logs).
Hence, I'm stumped. Any suggestions would be very, very welcome. 🙂