Enable clean URLs for Drupal 6.x on Snow Leopard

By default clean URLs cannot be enabled on Snow Leopard (Macbook pro) unless one of the following prerequisites is done:

  1. 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
  2. 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

    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 /


Add new comment

Plain text

  • No HTML tags allowed.
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.