Enable clean URLs for Drupal 6.x on Snow Leopard
1
By default clean URLs cannot be enabled on Snow Leopard (Macbook pro) unless one of the following prerequisites is done:
- If your web document root is /Library/WebServer/Documents and drupal is installed in /Library/WebServer/Documents/drupal then in /etc/apache2/httpd.conf find the document root <Directory "/Library/WebServer/Documents"> and change AllowOverride None to AllowOverride All like below.
# # This should be changed to whatever you set DocumentRoot to. # <Directory "/Library/WebServer/Documents"> # # 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 MultiViews # # 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 # # Controls who can get stuff from this server. # Order allow,deny Allow from all </Directory> - If drupal is installed in /Users/<user>/Sites/drupal then edit /etc/apache2/users/<user>.conf to look like below.
Alias /drupal /Users/<user>/Sites/drupal <Directory "/Users/<user>/Sites/"> Options Indexes FollowSymlinks Multiviews AllowOverride All Order allow,deny Allow from all </Directory>FollowSymlinks has been added and AllowOverride has been set to All. Finally in /Users/<user>/Sites/drupal/.htaccess set RewriteBase to /drupal.
... # Modify the RewriteBase if you are using Drupal in a subdirectory or in a # VirtualDocumentRoot and the rewrite rules are not working properly. # For example if your site is at http://example.com/drupal uncomment and # modify the following line: RewriteBase /drupal # # If your site is running in a VirtualDocumentRoot at http://example.com/, # uncomment the following line: # RewriteBase / ...
1
Comments
Very clear, many thanks.
Very clear, many thanks.
Perfect! Thank you.
Add new comment