Rewrite Rules Not Working
Hi,
I'm running Apache2 on Mac OS X 10.8 Mountain Lion and the rewrite rules in the .htaccess file are not working for me. I've also deployed the site into a subdirectory that's in a user directory. For example, the URL for the root directory of dropplets is as follows:
http://localhost/~user/dropplets/
Here's my .htaccess file:
Pretty Permalinks
RewriteRule ^(dashboard)($|/) - [L] RewriteRule ^(images)($|/) - [L] Options +FollowSymLinks -MultiViews RewriteEngine on RewriteBase /~user/ RewriteCond %{REQUEST_URI} !index RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?filename=$1 [NC,QSA,L]
Any help would be appreciated.
Thanks
If Dropplets is in /~user/dropplets/, then RewriteBase should be:
RewriteBase /~user/dropplets/
Does that work?
I tried that too... it didn't work...
I'm still getting a 404. It's almost like the Rewrite Rule is never getting invoked. Maybe something is horky about my https.conf
That is possible. Go look in your Apache directory (/etc/apache2/ probably) and see if your sites-enabled configs have this under a VirtualHost:
<Directory /path/to/wherever/~/user/dropplets/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
That was the issue. In my user directory directive, I had AllowOverride set to None for some unknown reason. Thanks for the help.