Redirect after login to referring page above forum
Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=29136
Printed Date: 28 March 2026 at 12:37pm Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com
Topic: Redirect after login to referring page above forum
Posted By: VTBO
Subject: Redirect after login to referring page above forum
Date 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
|
Replies:
Posted By: VTBO
Date 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
|
Posted By: 123Simples
Date 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
------------- http://www.123simples.com/" rel="nofollow - Visit 123 Simples Web Design
|
Posted By: VTBO
Date 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
|
Posted By: 123Simples
Date 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
------------- http://www.123simples.com/" rel="nofollow - Visit 123 Simples Web Design
|
|