开发者

Redirection issue

I have a folder 'Main' [wherein the index.php resides] with a sub-folder called 'Users'. The 'Users' folder has two sub-fol开发者_JS百科ders '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?


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 :)


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜