Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Redirect after login to referring page above forum
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Redirect after login to referring page above forum

 Post Reply Post Reply
Author
VTBO View Drop Down
Newbie
Newbie


Joined: 01 November 2008
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote VTBO Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
VTBO View Drop Down
Newbie
Newbie


Joined: 01 November 2008
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote VTBO Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
123Simples View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
Post Options Post Options   Thanks (0) Thanks(0)   Quote 123Simples Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
VTBO View Drop Down
Newbie
Newbie


Joined: 01 November 2008
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote VTBO Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
123Simples View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 July 2007
Location: United Kingdom
Status: Offline
Points: 1192
Post Options Post Options   Thanks (0) Thanks(0)   Quote 123Simples Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.