Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Aiheen aloitti: ctr - marraskuu 18, 2008, 09:31:04 AP

Otsikko: Redirect on login
Kirjoitti: ctr - marraskuu 18, 2008, 09:31:04 AP
I require users to be logged in to view topics.

If I send a link to someone, let's say this http://www.mysite.com/forum/index.php?topic=355.0 and they aren't logged in when they click the link, they go to the index page when they've logged in.

Why aren't they redirected to the link they clicked?  Can I edit this somehow?

Thanks, Cliff

<edited to remove comma from link>
Otsikko: Re: Redirect on login
Kirjoitti: ccbtimewiz - marraskuu 18, 2008, 11:30:21 AP
Is that comma included with the link?
Otsikko: Re: Redirect on login
Kirjoitti: ctr - marraskuu 18, 2008, 12:04:02 IP
Yes, but it's there because when I pasted the link (without the comma), I guess I typed the comma too close to the link and SMF added it to the link displayed here.
The URL's displayed on the forum do not have a comma.
Otsikko: Re: Redirect on login
Kirjoitti: ctr - marraskuu 25, 2008, 11:23:20 AP
Any suggestion on how to fix this?
I am using 2.0 Beta 4 with the default theme, and no modifications.
Otsikko: Re: Redirect on login
Kirjoitti: Kermit - marraskuu 25, 2008, 11:27:19 AP
Actually if you have no modifications on your forum,the user should not be redirected to index.php after the login , try to renew your Sources/LogInOut.php file
Otsikko: Re: Redirect on login
Kirjoitti: ctr - marraskuu 25, 2008, 12:06:06 IP
Thanks for the suggestion.
I uploaded all new files, but it still redirects to the index.
Otsikko: Re: Redirect on login
Kirjoitti: ctr - joulukuu 01, 2008, 09:55:35 AP
Does anyone have any other suggestions on why this is happening?  I have all original / unmodified files.  There are no mods of themes installed.
Otsikko: Re: Redirect on login
Kirjoitti: Oldiesmann - helmikuu 02, 2009, 09:02:05 IP
Sorry for the delayed response...

Does this make any difference?

Sources/Subs-Auth.php

Find
Koodi (Line 247) [Valitse]
$_SESSION['login_url'] = $_SERVER['REQUEST_URL'];

Add after that
$_SESSION['old_url'] = $_SERVER['REQUEST_URL'];
Otsikko: Re: Redirect on login
Kirjoitti: ctr - helmikuu 09, 2009, 01:18:28 IP
Thanks Oldiesmann, that didn't work either.
This is weird.  I've deleted any non-standard files, uploaded all new files and it still won't redirect correctly if I am not logged in.
Otsikko: Re: Redirect on login
Kirjoitti: greyknight17 - helmikuu 27, 2009, 11:53:11 AP
ctr, is this issue resolved now?

I can't reproduce this error on a clean SMF 2.0 beta 4 install. It seems to be working fine. Any changes made to your forum before this problem began?
Otsikko: Re: Redirect on login
Kirjoitti: ctr - helmikuu 27, 2009, 12:03:33 IP
Lainaus käyttäjältä: greyknight17 - helmikuu 27, 2009, 11:53:11 AP
ctr, is this issue resolved now?

I can't reproduce this error on a clean SMF 2.0 beta 4 install. It seems to be working fine. Any changes made to your forum before this problem began?
Hi,
It still happens.
Like I said, I uploaded all new files, and it still redirects to the index page if I wasn't logged in.  It happens at work and at home.

Cliff
Otsikko: Re: Redirect on login
Kirjoitti: JimM - maaliskuu 15, 2009, 10:28:02 IP
I'm also not able to reproduce this on my 2.0RC1 test install.  ctr, any update on this one?