Reputation: 7519
I have a folder 'Main' [wherein the index.php resides] with a sub-folder called 'Users'. The 'Users' folder has two sub-folders 'A' and 'B'. When user A logs in with correct credentials, it should show the url as http://domain.com/A
rather than http://domain.com/users/A
.
How can I achieve this in either .htaccess or javascript or php?
Upvotes: 0
Views: 52
Reputation: 6740
After login you need to identify if the user loging on is of type A of B If A then redirects to '/users/A' else if it's B then redirects to '/users/B' . And this needs to be done in PHP
Upvotes: 0
Reputation: 1122
From what I understand you can put:
RewriteRule ^/A$ /users/A
in .htaccess
and redirect the user via PHP (once he logs in) like this:
header("Location: {yourSite}/A");
Hope I understood your problem and this helps :)
Upvotes: 2