Search code examples
apachedrupalmod-rewritedrupal-6

Clean URL's not working, mod_rewrite module installed


I just installed a fresh copy of Drupal 6.19 to get to speed on how to write modules. But for some reason the rewrite module isn't working for Drupal.

What I have checked:

  • $ apachectl -M >> it is installed
  • php_info() on current server >> says rewrite is installed also
  • I also double-checked the .htaccess file in my Drupal root folder
  • UPDATE: checked httpd.conf for AllowOverride All

I'm out options here. Looked everywhere but the Drupal settings aren't letting me to enable the settings and their test is simply visiting a site that should work if the rewrite module was there.

My specs: Mac OS X 10.6 Snow Leopard Using built-in Apache with PHP5

Thanks!


Solution

  • Two more things to check:

    1. Verify that your .htaccess is readable for your apache processes (Yes, I read that you double checked it, but did that include the file permissions?)
    2. Enable rewrite logging - this might give you some hints on where it fails. Start with a log level of 5 and increase/decrease as needed. (Don't forget to turn it off again later, as it is a huge performance hog ;)

    Also, I'd try to simplify the test scenario - start with a simple rewrite directive in a vhost configuration. Once that works, move it to a .htaccess in the top-level of the vhosts document root, then to sub directories (if needed/used).