Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

wesg

macrumors regular
Original poster
Jan 2, 2008
211
0
Toronto, ON
I have a Ubuntu server at home for most of my website development, but I like to do some local work on my MBP when in nontraditional locales. Right now I'm having trouble enabling .htaccess in order to get mod_rewrites working with WordPress. I've heard the file /private/etc/apache2/httpd.conf holds the key (by marking AllowOverride to All) but even after making that change and restarting Apache, I have nothing.

Is there a way to test Apache or mod_rewrite status and find other files I may need to change? What else can I do to enable this feature?
 
You could just put the rewrite rules in the httpd.conf. Just remove the rewritebase line though.
 
There's no enabling of .htaccess really, it's setup from the start for you. Are you positive the .htaccess file isn't being looked at and not just there being an issue with your .htaccess file? The files can be very finicky when it comes to syntax.
 
Just looked at my set up. In /etc/apache2/httpd.conf instances of AllowOveride are set to None. In /etc/apache2/users/username.conf i've set AllowOveride All.

That works for my .htaccess files.

You could just put the rewrite rules in the httpd.conf. Just remove the rewritebase line though.

You could, but somtimes you wnat to use .htaccess, in particular for wordpress as the OP is using; it makes it easier to synchronise changes with production server.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.