Permalinks not working (.htaccess is writable)

Have you tried something simple to ensure it is actually rewriting? Something like…

RewriteEngine On
RewriteRule ^.*$ verified.php

Then create a verified.php page…

<?php
print 'mod_rewrite works!';
?>

Now you should hit that page no matter where you try to go on the site. If you don’t mod_rewrite isn’t working.

You can also turn on mod_rewrite logging. You cannot do it in .htaccess but you can in the VirtualHost directive or directly in your server’s conf file.

RewriteEngine On
RewriteLog "/var/log/httpd/rewrite.log"
# From 0 (no logging) to 9 (OMFG make it stop)
RewriteLogLevel 3

Once it is on you can see what is, or isn’t happening.

Oh and don’t forget to turn it off. It can have a serious impact on the server if it is set 3+.

Leave a Comment