
Having problems enabling clean URLs in Drupal? We have a solution for you that may help. Under new installations on Windows, the button may be disabled and require some changes in your Apache configuration file.
The clean URL feature when used with the Path module, allows you to create friendly URLs that rid of URL signatures of the form:
http://www.yoursite.com/?q=something
and turn them into:
http://www.yoursite.com/something
If set, your DirectoryIndex to include index.php and surf to your website it may appear everything is working correctly:
DirectoryIndex index.php index.html
You will be able to install and use your Drupal website. However, that isn't the case. The .htaccess file really isn't being used. This is because if you look in your httpd.conf file, the AllowOverride setting for your directory is turned off!
After a fresh installation you will notice that the clean URL feature is disabled. In our case, we knew that mod_rewrite was enabled it because we saw it in the phpinfo report.
One solution I found is to enable the AllowOverride rule in the httpd.conf file as follows:
#
# This should be changed to whatever you set DocumentRoot to.
#
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
# AllowOverride None
#----------------------------------
# TURN THIS ON TO OVERRIDE ALL
#----------------------------------
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
After you do that, .htaccess should be be made available and the disabled button turned on in the clean URL feature of Drupal.
Strangely, Apache says that AllowOverride All is on by default but instead turns it off.
Note:
If you don't want to go through the hassle of figuring out if your host meets Drupal requirements and wasting time troubleshooting, use Hostgator. This site happens to be on HostGator and is running Drupal multisites. I've used them throughout the years and they are affordably priced and very good on support. Some hosts will not turn on mod_rewrite but Hostgator does.
Note: If you signup using Hostgator use the banner above. Please also contact me if you have done so to let me know.