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!
As Álvaro G. Vicario mentioned, the first thing to do is at the top of the
.htaccess
file add something likeghfdiddfdjf
which should throw an internal error. If it doesn't, you know the.htaccess
file isn't being read. Mine wasn't, and I found the following fix:In the
etc/apache2/sites-enabled
folder, there was a file calleddefault-000
. It was in this file that I changedAllowOverride All
in 2 places in the file.Two more things to check:
.htaccess
is readable for your apache processes (Yes, I read that you double checked it, but did that include the file permissions?)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).
If you running your Drupal installation in a sub-folder like: example.com/drupal, then enable "RewriteBase /" in your .htaccess file, it might help you.
Look for this Line in your httpd.conf file
If commented Just uncomment it restart apache server then try enabling in drupal administer Clean URL Section
I added the following to my .htaccess file and it was solved. My problem was specifically hapening with Rackspace / CentOS image
Options -MultiViews
Last but not least, you must authorize your virtual host or directory to use
.htaccess
.Update:
I can't figure out your exact problem but it's always worth testing that Apache is actually parsing your
.htaccess
file. Make a syntax error on purpose and see if you get a500 Internal Server Error
message. Also, testmod_rewrite
with a simple redirection rule that doesn't involve Drupal.