Clean URLs do not work out of the box on XAMPP 1.5.x with PHP4 due to a problem in Apache's module load order; mod_rewrite will not work properly. To remedy this you will need to edit the file [path_to_xampp]/apache/conf/httpd.conf.
mod_rewrite location
Remove the # at the beginning of this line:
LoadModule rewrite_module modules/mod_rewrite.so
and move it to just above or below
#LoadModule cache_module modules/mod_cache.so
AllowOverride
If the mod_rewrite change does not work, you also need to check that AllowOverride All is set for the directory Drupal is in. Do this in httpd.conf or extra/httpd-xampp.conf
Open up file \apache\conf\extra\httpd-xampp.conf
Put this code
Alias /drupal "C:/Program Files/xampp/htdocs/drupal/"
AllowOverride All
Order allow,deny
Allow from all
AllowOverride All
Order allow,deny
Allow from all
Remember to change the path to match your installation location.
If you're not sure where to add it, it might be worth putting it under the entry
Alias /security "C:/Program Files/xampp/security/htdocs/"
...
...
Always restart Apache after you make changes or the changes to its configuration files won't have an effect.
Drupal Directory
If Drupal is not installed in the document root, the next thing you'll have to do is modify the file .htaccess that comes with Drupal. Remove the commentsign (#) in front of RewriteBase and, if necessary, modify the path:
RewriteBase /drupal
Finally, in Drupal go to Administer » Site Configuration » Clean URLs (admin/settings/clean-urls) and run the clean URL test. Then click the "Enabled" option for Clean URLs and save the settings.
No comments:
Post a Comment