| Author |
Topic Search Topic Options
|
VTBO
Newbie
Joined: 01 November 2008
Status: Offline
Points: 24
|
Post Options
Thanks(0)
Quote Reply
Topic: Redirect after login to referring page above forum Posted: 18 February 2011 at 12:27am |
|
I am using the forum as a part of a web site, and using it as the login app for the site as well. After login, instead of redirecting to the default.asp of the forum I would like it to redirect to the page that I came from. Is this possible? It seems to redirect to pages inside of the forum ok but not outside of it.
I found the code in login_user_test.asp to keep it from redirecting outside and commented it out, but it still does not do it.
I commented this out so that it would not remove the /
strReturnURL = Replace(strReturnURL, "/", "", 1, -1, 1)
But because there is no ? in strReturnURL it defaults to default.asp seen below.
If strReturnURL = "" OR Instr(strReturnURL, "?") = 0 Then strReturnURL = "default.asp" & strQsSID1
Any help?
Thanks,
Phil
Edited by VTBO - 18 February 2011 at 12:32am
|
 |
VTBO
Newbie
Joined: 01 November 2008
Status: Offline
Points: 24
|
Post Options
Thanks(0)
Quote Reply
Posted: 18 February 2011 at 12:49am |
|
I also added the string to the end of my login link similar to what is done within the forum.
?returnURL=forum_topics.asp?FID=1&
but still doesn't do it.
Phil
|
 |
123Simples
Senior Member
Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
|
Post Options
Thanks(0)
Quote Reply
Posted: 18 February 2011 at 11:03am |
|
I think you'll find that you cannot do this. It's designed to prevent users from being redirected to rogue pages outside of the forum (I don't mean to imply your site is not good or safe), but that is how I understand the software works, otherwise people could redirect users to unsafe sites if they chose to. Bruce will clarify if I'm wrong, or others here may have a better answer
|
|
|
 |
VTBO
Newbie
Joined: 01 November 2008
Status: Offline
Points: 24
|
Post Options
Thanks(0)
Quote Reply
Posted: 18 February 2011 at 12:23pm |
|
OOPS! Found it. Guess too many hours staring at the screen. I had put a & between the <%=Request.ServerVariables("SCRIPT_NAME")%>?<%=Request.ServerVariables("QUERY_STRING")%>" instead of a ? in the returnURL parameter. I must be loosin it!
After I found my mistake, all I had to do was to comment out that one line where it replaces the / so that I can go to the root of the web site instead of sticking in /forum.
Too many 18 hour programming sessions I guess.
Phil
|
 |
123Simples
Senior Member
Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
|
Post Options
Thanks(0)
Quote Reply
Posted: 18 February 2011 at 7:25pm |
|
Easy done Phil When you are just staring at "coding" all the time Glad it works for you
|
|
|
 |