Closed (duplicate)
Project:
Redirect 403 to User Login
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2010 at 21:45 UTC
Updated:
7 Nov 2010 at 20:57 UTC
Hi all!
Since I'm using Internationalization module (D6, v1.5), I've noticed that during the redirection AFTER the login, the lang prefix is being added once again.
After poking around with the code, I've found the solution:
On line 77, add
global $language;
On line 83, add
// Check for path prefix and strip it out if its found.
$prefix = $language->language .'/';
$path = str_replace($prefix, '', drupal_urlencode($_REQUEST['q']));
Finally, on the following line, change the routine to this:
// using drupal_goto() with destination set causes a recursive redirect loop
header('Location: '. url('user/login', array('query' => 'destination='. $path, 'absolute' => TRUE)), TRUE, 302);
And the problem is solved. It always redirects me to the correct language and page.
I hope I've helped.
Many thanks for this wonderful module!
Comments
Comment #1
deekayen commentedComment #2
deekayen commented#339120: Redirect issues