Reputation: 11065
Now my site url is somthing like this
http://mydomain.com/MainFolder/user/login.php
http://mydomain.com/MainFolder/reports/dashboard.php
I need to hide the folder structure from the URL.
So the url will look like
http://mydomain.com/dashboard.php
Thanks in advance....
Upvotes: 0
Views: 1045
Reputation: 2518
Save that into .htaccess
in your root web folder:
RewriteEngine On
RewriteRule login.php$ MainFolder/user/login.php
RewriteRule dashboard.php$ MainFolder/reports/dashboard.php
I don't know how many users you have - but this won't perform that good, because everytime someone accesses your site, the .htaccess file has to be read again. It would be better to include that in the vhost.conf (if possible!)...
Upvotes: 1