Print Page | Close Window

Redirect after login

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=22366
Printed Date: 08 April 2026 at 8:23am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Redirect after login
Posted By: ForumDummy
Subject: Redirect after login
Date Posted: 09 January 2007 at 3:50pm
If you in a certain forum and then decide to login, shouldn't you be redirected back to that particular forum? It seems to work that way with webwiz.net but not with my 8.05 forum. Isn't this code in forum login_user_test.asp supposed to bring you back?

ElseIf intForumID > 0 Then
     strReturnPage = "forum_topics.asp?" & removeAllTags(Request.QueryString)



Replies:
Posted By: Brandt
Date Posted: 10 January 2007 at 8:45pm
I've a similar problem, I think. I like to jump to a specific topic, by specifying the URL als forum_posts.asp?TID=nnn But if that forum requires a password, you are correctly redirected to a login page. But after login, you end up in default.asp whereas I would rather be redirected to the topic requested, ie TID=nnn. It seems to me that somewhere in all the redirects (forum_posts --> insufficient_permission --> login_user --> login_user_test --> default) the query string is lost. Would appreciate if  anyone would post a solution


Posted By: ForumDummy
Date Posted: 11 January 2007 at 1:12am
I have just made a test on this very board. I wanted to reply to this thread but since I was logged out, when I clicked the reply button I was taken to a login screen. Then, after loging in, I was redirected to the the correct forum but not to this topic page. I have two points to make here:

1) Why doesn't my forum work this way? I end up in the default page as Brandt indicates above.

2) It seems the most logical redirect would be a redirect to the page you were on prior to logging in.


Posted By: Mikey
Date Posted: 11 January 2007 at 1:37am
This forum runs version 8.50 alpha which is likely never to see the light of day as version 9 will supersede it

-------------
Handyman man?


Posted By: ForumDummy
Date Posted: 11 January 2007 at 3:53am
Originally posted by Mikey Mikey wrote:

This forum runs version 8.50 alpha which is likely never to see the light of day as version 9 will supersede it


is there way I can get the login_user_test file that is used in 8.50 alpha?


Posted By: kpdillon
Date Posted: 11 January 2007 at 4:54am
I too would be interested in this...


Posted By: MrMellie
Date Posted: 11 January 2007 at 8:32am
Originally posted by kpdillon kpdillon wrote:

I too would be interested in this...
Me three.


Posted By: ForumDummy
Date Posted: 11 January 2007 at 8:52am
So there you have it Moderators, popular demand!


Posted By: Mikey
Date Posted: 11 January 2007 at 12:03pm
I would imagine there's more changes and releasing part tested code isn't in anyone's intrest, just be patient for a little while as the beta of version 9 is due asap

-------------
Handyman man?


Posted By: Brandt
Date Posted: 11 January 2007 at 9:16pm
Using the suggestion made in http://forums.webwiz.net/forum_posts.asp?TID=22277 - http://forums.webwiz.net/forum_posts.asp?TID=22277 I've now got the required behaviour, i.e. after logging in you get the topic displayed and not the default forum page. The mod I've made is that I've not used the HTTP_REFERER variable (as that points to the page containing the link to the topic and not the forum topic itself, due the the redirect) but added

        Session("FeedBackURL") = "forum_posts.asp?TID=" & lngTopicID
 
just before the redirect to insufficient_permission.asp in file forum_posts.asp


Posted By: ForumDummy
Date Posted: 12 January 2007 at 1:52am
Originally posted by Brandt Brandt wrote:

The mod I've made is that I've not used the HTTP_REFERER variable (as that points to the page containing the link to the topic and not the forum topic itself, due the the redirect) but added        Session("FeedBackURL") = "forum_posts.asp?TID=" & lngTopicID just before the redirect to insufficient_permission.asp in file forum_posts.asp


I am not clear on your code is supposed to go. Which file should this go into and where in the file would I place it?:

Session("FeedBackURL") = "forum_posts.asp?TID=" & lngTopicID

So, does doing this bring you back to the forum the topic is in instead of the topic itelf?

What I am trying to do is redirect the user back to the page they were on prior to being presented with a login screen.



Posted By: Brandt
Date Posted: 12 January 2007 at 8:52am
If you send somebody a link to a topic (which looks like http://www.yoursite.com/forum/forum_posts.asp?TID=123 - http://www.yoursite.com/forum/forum_posts.asp?TID=123 ), and that forum requires you to login, you unfortunately end up in default.asp after you've loged in. This also happens on this site. I find this not very user-friendly. I want the user to get the topic displayed, after he has provided username and password.
Therefore, I've added the above code in the file forum_posts.asp, just before the line where the redirection to insufficient_permission.asp is; somewhere around line 305.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net