Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a site which requires mod_rewrite rules in an .htaccess file.

But when uploading the file to this new OSX 10.6 Server install (with Apache 2.2.13) it just disappears. I'm pretty sure that this isn't just invisible files not being shown - I have these set to visible in my FTP app though I don't have shell access to verify they are there.

And phpinfo shows mod_rewrite as being enabled. Yet none of the rules are applied.

I am not the server admin but he says that any files beginning with a "." are not supported by any OSX servers. I'm pretty sure this isn't the case but wanted some clarification.

If this is actually possible and what advice might I give him for getting this to work?

share|improve this question

.htaccess files are disabled by default in OS X's Apache config. You can enable them with the Server Admin GUI by selecting the Web service in the sidebar -> Sites in the toolbar -> your virtual site under that -> Options tab under that, and enabling "Allow All Overrides". Or, equivalently, you can edit the site config file (under /etc/apache2/sites) and change the line that says AllowOverride None to AllowOverride All.

share|improve this answer
After spending a few looking for the "switch" - Big thanks! – Stephen Cox Aug 31 '11 at 15:07

Macs don't normally display files starting with a period - use TinkerTool to let you see them.

share|improve this answer
Yep I know they aren't usually displayed. Just wondering how this affects them as .htaccess files under Apache and whether it is indeed possible to use mod_rewrite rules on OSX at all. Surely it must be. – user57472 Oct 18 '10 at 15:49

Hidden files are supported, they're treated as system files and hidden from the GUI view. Apache will still find the .htaccess file. However, it's possible apache isn't configured to use .htaccess files.

In general, .htaccess files use the same syntax as the main configuration files. What you can put in these files is determined by the AllowOverride directive.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.