I have a redirect problem with 'RewriteRule', i have this in mt .htaccess:
RewriteCond %{HTTP_HOST} ^foo.domain.com
RewriteRule ^(.*)$ http://www.domain.com/foo/$1 [R=permanent,L]
If i go to foo.domain.com redirect to www.domain.com/foo/ and it's ok, instead i go to foo.domain.com/bar i have an error, must go to www.domain.com/foo/bar. Where is error?
.htaccessare relative to the URL component (directory underDocumentRoot) that they are in. This is not the same as putting them in the (global) configuration file. So without knowing where your.htaccessfile is, relative toDocumentRoot, it's not possible to interpret your question to give a reliable answer