1
prophecy100
Incorrect Redirection Problem

Hello all

I am having a small problem that I hope someone here can help me with.

I have XOOPS installed in a directory called portal, i.e.http://mydomain.com/portal, I also have a seperate login page outside this structure,http://mydomain.com/login.htm. I have inserted the following code at the top of index.php to redirect the user to this login page if they are not logged in:

if ( !$xoopsUser ) {
redirect_header("http://mydomain.com/login.htm");
exit();
}

This works fine if the user tries to go to the index page, however if the user tries to go to another url, for examplehttp://mydomain.com/portal/modules/articles/index.php then XOOPS seems to go into a direct loop. The user is told they do not have access (which is correct) and then they are redirected to nowhere. XOOPS tries to redirect but all that happens is the URL gets longer and longer and it seems to continually loop. Below is an example of the url this creates.

Does anyone know where I can change or specify the redirect location. I tried altering a couple of lines in includes/checklogin.php which referred to INCORRECTLOGIN but this didn't seem to have any effect.

Any ideas?

Many thanks

Jonathan

URL Example-

http://mydomain.com/portal/user.php?xoops_redirect=%2Fportal%2Fuser.php%3Fxoops_redirect%3D%252Fportal%252Fuser.php%253Fxoops_redirect%253D%25252Fportal%25252Fuser.php%25253Fxoops_redirect%25253D%2525252Fportal%2525252Fuser.php%2525253Fxoops_redirect%2525253D%252525252Fportal%252525252Fuser.php%252525253Fxoops_redirect%252525253D%25252525252Fportal%25252525252Fuser.php%25252525253Fxoops_redirect%25252525253D%2525252525252Fportal%2525252525252Fuser.php%2525252525253Fxoops_redirect%2525252525253D%252525252525252Fportal%252525252525252Fuser.php%252525252525253Fxoops_redirect%252525252525253D%25252525252525252Fportal%25252525252525252Fuser.php%25252525252525253Fxoops_redirect%25252525252525253D%2525252525252525252Fportal%2525252525252525252Fmodules%2525252525252525252Farticles%2525252525252525252F

Login

Who's Online

216 user(s) are online (149 user(s) are browsing Support Forums)


Members: 0


Guests: 216


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits