I upgraded Apache 2.2.14 to 2.2.15. I had working mod_rewrite code, but after the upgrade, it stopped working! :mad: I checked the config to make sure mod_rewrite was on (which it was), and I checked the modules folder for the mod_rewrite module (it was there). I don’t know whats wrong now. Can somebody help?
For a refresher, I want somebody to be able to type “http://localhost/social/USERNAME” and get sent to “http:/localhost/social/user.php?user=USERNAME”. Here is my .htaccess code.
Upgrading Apache wouldn’t disable mod_rewrite unless you’ve overwritten the UNcommented LoadModule line (most likely culprit) OR changed the DocumentRoot on your VirtualHost (not so likely with localhost).
As for your code, haven’t we been through this before? Okay, NOT the username is USERNAME so I’ll assume this is all CAPS.
Options +FollowSymLinks
# THAT should be in your httpd.conf
RewriteEngine on
[COLOR="Gray"]RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d[/COLOR]
RewriteRule ^social/([A-Z]+)$ social/user.php?user=$1 [L]
As written, there should be NO conflict with existing files and probably no conflict with social’s subdirectories.