MyBB Community Forums

Full Version: Redirect to portal after login?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I updated the .htaccess with portal.php so it will show people the portal rather than index.php when they go to the website:

DirectoryIndex portal.php index.php


However, after they log in, it redirects them to the forum still. How do you have it redirect to the portal? (these should really be options in mybb!)

Thank you!
You would just need to edit the member.php file to redirect to your portal.
(2011-04-29, 10:06 PM)Spazmatic Wrote: [ -> ]You would just need to edit the member.php file to redirect to your portal.


Have any specifics on what I would need to edit and what to change it to?
If you want to redirect your users to portal after they logged in to your forum then open ./member.php and find; around line # 1088
redirect(htmlentities($mybb->input['url']), $lang->redirect_loggedin);
and change it to;
redirect("portal.php", $lang->redirect_loggedin);
(2011-04-30, 04:29 PM)Yaldaram Wrote: [ -> ]If you want to redirect your users to portal after they logged in to your forum then open ./member.php and find; around line # 1088
redirect(htmlentities($mybb->input['url']), $lang->redirect_loggedin);
and change it to;
redirect("portal.php", $lang->redirect_loggedin);

I tried that already and it resulted in errors when trying to log in or out.
(2011-04-30, 04:21 PM)BBFPaco Wrote: [ -> ]
(2011-04-29, 10:06 PM)Spazmatic Wrote: [ -> ]You would just need to edit the member.php file to redirect to your portal.


Have any specifics on what I would need to edit and what to change it to?

Line 1092, find:
redirect("index.php", $lang->redirect_loggedin);

Replace with:
redirect("portal.php", $lang->redirect_loggedin);
(2011-04-30, 04:37 PM)AJS Wrote: [ -> ]
(2011-04-30, 04:21 PM)BBFPaco Wrote: [ -> ]
(2011-04-29, 10:06 PM)Spazmatic Wrote: [ -> ]You would just need to edit the member.php file to redirect to your portal.


Have any specifics on what I would need to edit and what to change it to?

Line 1092, find:
redirect("index.php", $lang->redirect_loggedin);

Replace with:
redirect("portal.php", $lang->redirect_loggedin);


Tried that too, but I did not try your suggestion and the above suggestion. Do I need to do both? Those lines are close to each other.


Thank you for the feedback.
I've tested mien and its working here. Are you sure you are editing the correct line ?
What error does it give?
Pages: 1 2