I cannot get mod_rewrite to work on Lion. I am developing a number of websites locally, in ~/Sites, using .htaccess files. I am on 10.7.3 and I have not touched any configuration files except for enabling PHP in httpd.conf (which works).
I know there are at least 2 questions about this here, but the solutions detailed there don't work. Nor do the other solutions that I have found on the web. I must be doing something stupid or overlooking something, or else I am probably going crazy, but it's not working.
I've tried all the usual stuff:
In
/private/etc/apache2/users/<myusername>.conf
, changeAllowOverride None
toAllowOverride All
and restart the web serverAdditionally, in
/private/etc/apache2/httpd.conf
, change any/all occurrence(s) ofAllowOverride None
toAllowOverride All
-- I've tried it in all the various places where these directives are foundTry basically all possible combinations of values for the
Options
line above/below theAllowOverride
line, including the values:Indexes MultiViews FollowSymLinks All
Always restarting the web server after such a change, of course. None of this works. All my clean urls simply do not work; I get a 404 - not found. Apache's error log just gives me "File does not exist:" errors. So it seems that the mod_rewrite module is not even working at all.
I made sure that mod_rewrite is loaded in the httpd.conf, which it is; it is so by default on a Lion install.
The crazy thing is that everything had been working perfectly -- until I migrated to a new machine running Lion. That is, I am ruling out an error in my .htaccess files because I know it worked before. Also, if it was an error in the .htaccess, I would get some kind of error message from the mod_rewrite module in Apache's error_log, at least telling me that the module itself is being called. But this is not happening.
Am I overlooking something? Do I have to change config settings someplace else? Do I have to change PHP's config? Why are the instructions (like How to activate mod_rewrite on MacOSX Lion and getting mod_rewrite to work on Mac OS X) working for other people but not for me? :)
I've wasted hours on this already. Any help would be VERY appreciated.