Anyone yet know how to enable Clean URLs on Leopard? I'm using the included apache2 environment for development. The hosting company I use allows Clean URLs, so I'm using them with drupal, but when I upgraded from Tiger to Leopard, I switched from using XAMPP to trying the included apache2.

Comments

kevinsmith’s picture

Figured it out, so I'm posting the answer for whoever else runs across it. The apache distribution that's in OS X Leopard (and I'm pretty sure Tiger) disables .htaccess, so you just have to go in and change that setting in the server config file. This takes care of the problem.

There's a section in httpd.conf (located in /private/etc/apache2 in Leopard):

    #
    # 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

...so change that 'None' to 'All'.

Now, go into your username config file (located in /private/etc/apache2/users in Leopard):

<Directory "/Users/username/Sites/">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

Again, change 'AllowOverride None' to 'AllowOverride All'.

westwesterson’s picture

im pretty sure macs disable all files that begin with a . there is probably a configuration setting which allows you to see these. The files are still there, they are just hidden so you can't copy or select them.

kevinsmith’s picture

Yes, but it's probably a bad idea to enable viewing of ALL hidden files. Even I would probably end up ruining the system.

To see a hidden file, I just use Terminal.

shawn dearmond’s picture

Just another note: For OS X 10.5 Server, the place to change the AllowOverride line is in the .conf file(s) in the /etc/apache2/sites directory.

jonahan’s picture

Thanks guys, this was a bitch to get working until I stumbled across the post. :)