dropplets icon indicating copy to clipboard operation
dropplets copied to clipboard

Rewrite Rules Not Working

Open tspauld98 opened this issue 13 years ago • 4 comments

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

tspauld98 avatar Jul 26 '13 20:07 tspauld98

If Dropplets is in /~user/dropplets/, then RewriteBase should be:

RewriteBase /~user/dropplets/

Does that work?

benlk avatar Jul 26 '13 20:07 benlk

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

tspauld98 avatar Jul 26 '13 20:07 tspauld98

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>

benlk avatar Jul 26 '13 20:07 benlk

That was the issue. In my user directory directive, I had AllowOverride set to None for some unknown reason. Thanks for the help.

tspauld98 avatar Jul 26 '13 20:07 tspauld98