Thursday, May 6, 2010

Cannot get mod_rewrite to work with drupal 6 on LAMP

I have been battling apache for the past few days trying to enable Clean URL's in Drupal using mod_rewrite. IT just won't work. I can't seem to get drupal to want to allow me to enable clean urls.


root@VolatileMinds:/var/www# apache2ctl -M
Loaded Modules:
 core_module (static)
 log_config_module (static)
 logio_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 actions_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_default_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 dav_module (shared)
 dav_svn_module (shared)
 authz_svn_module (shared)
 dir_module (shared)
 env_module (shared)
 include_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 php5_module (shared)
 proxy_html_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 ssl_module (shared)
 status_module (shared)
 suexec_module (shared)
Syntax OK
root@VolatileMinds:/var/www#


The module is indeed being loaded properly, but Drupal always tells me there is something wrong with my configuration for apache and never allows me to enable clean urls.

Any thoughts on this? Has anyone run into this before?


EDIT: I got it! the .htaccess had a RewriteBase of /drupal5. It needed to be just /.