Clean URLs / URL Re-writing on Mac OS X Leopard

For whatever reason, the whole LAMP stack on a Mac is a bit of a pain to set up. If you want to get URL re-writing to work, you'll need to do the following (among other things):

To turn on clean URL's on Mac OS X 10.5.6:

Add "AccessFileName .htaccess" to /private/etc/apache2/httpd.conf (or wherever your httpd.conf file is located)

Then dependant on where you have installed drupal either:

If you've installed it in /Library/WebServer/Documents, for example, in httpd.conf change the AllowOverride directive to "AllowOverride All" in the directive.

Also, make sure you've un-commented the "RewriteBase" line and set it to whatever your base/root web folder is (e.g. "/", "/drupal", etc.).

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <h1> <h2> <h3> <h4> <h5> <h6> <img>
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Lines and paragraphs break automatically.

More information about formatting options