RewriteEngine on
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^\\.]+)$ $1.php [NC]
[indent]You do NOT have to escape the dot character WITHIN a
character range definition thus you should not.[/indent]
It is just plain wrong to use the No Case flag against a RewriteRule
(on a 'nix box - okay on WinDoze but not a good practice)
because URIs ARE case sensitive.
Then, you should be using the Last flag here to break the logic
that would otherwise tie this RewriteRule to the next (albeit
Apache ignores the implied AND in this case).[/indent]
RewriteCond %{REQUEST_FILENAME} >""
[indent]This will always be true as it includes the path
to the domain which can't be null.[/indent]
RewriteRule ^([^\\.]+)$ home/profile.php?user=$1 [L]
[indent]This ASSUMES that all URIs without a dot character
(file extension) will be a valid user value. IMHO, this is NOT
a good assumption and will likely cause problems UNLESS your
profile script has the intelligence to "dodge the bullet."
To your problem, though, this RewriteRule changes directory
level so all relative links will be off one level. Have a read of
my signature's tutorial for more information about this as well
as the two options you have to "dodge this bullet."[/indent]
I’m not sure what else you’ve done (header, index and footer shouldn’t be found IF they’re in the home subdirectory) so this code is looking for 404 above the root directory. you can resolve this (404) problem by making it an (internal) absolute redirection (eliminate the …).