I need to hide a folder from a url.
An example:
If I enter www.mysite.com/Jango
I need you to read the directory: www.mysite.com/users/Jango
This .htaccess
in /
should do:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^users/
RewriteRule ^(.*)$ users/$1 [L]
This treats any requset not starting with users/
as if it did.
Update:
If you want the rule to apply for only /Jango
--> /users/Jango
, this would be an appropriate .htaccess
:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^users/Jango
RewriteRule ^Jango/(.*)$ users/Jango/$1 [L]
(The [L]
-flag stops rewriting afther this rule, preventing possible circle-reactions etc)