Reputation: 785
In http://localhost
I have a folder named _admin
When I type http://localhost/admin
practically I want to open http://localhost/admin/_admin
but not with a redirect, I want with a htaccess alias.
Upvotes: 0
Views: 3257
Reputation: 2767
With .htaccess
RewriteRule ^something/_fakedir_/(.*) something/_originaldir_/$1
Upvotes: 0
Reputation: 3880
make a soft link.
ln -s _admin/ admin
So when you access admin
, you will get contents of _admin
OR
You can use mod_alias
module if you are using Apache web server.
The Alias directive allows documents to be stored in the local filesystem other than under the DocumentRoot. URLs with a (%-decoded) path beginning with URL-path will be mapped to local files beginning with directory-path. The URL-path is case-sensitive, even on case-insensitive file systems.
Example:
Alias /image /ftp/pub/image
<Directory /ftp/pub/image>
Order allow,deny
Allow from all
</Directory>
For more reading, click on me
Upvotes: 1