Redirect Loop and custom_url_rewrite ignored
WildBill - December 14, 2008 - 17:01
| Project: | Global Redirect |
| Version: | 6.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs review |
Description
Hello there,
I just upgraded from Drupal 5.x to 6.8, and in the process I also upgraded to the 6.x-1.0 version of Global Redirect. It caused every page except for the front page to be completely inaccessible (Redirect Loops). I couldn't even turn GR off. I finally had to delete it manually via FTP. I uploaded the 6.x-1.x-dev version, and that appears to have fixed the problem.
Just wanted to share my experience in the hopes it might be helpful.
Cheers.

#1
i just noted this with MAMP - i had to delete the module to access the modules pages (i did not try any other pages). Was not upgrading this module, just installing it. Got a message in FF about the loop...
#2
Forgive me - what does MAMP stand for?
#3
Just as LAMP is "Linux, Apache, MySQL, PHP", MAMP is the same for Mac OS X (Mac, Apache, MySQL, PHP).
#4
As 6.x-1.x-dev fixed the issue and that is going to become 1.1 as soon as this issue queue is sorted, I'm marking this as fixed.
#5
Automatically closed -- issue fixed for two weeks with no activity.
#6
I'm running the latest version of Global Redirect on Drupal 6.10 on a multi-site install. On some sites Global Redirect is giving me the redirect loops, but not on other sites.
The redirect loops occur almost everywhere in the site, apart from the main page. This is probably the reason that Global Redirect doesn't show up in update.php either. Could this be part of the problem?
#7
Drupal 6.10
MySQL database 5.0.51a
PHP 5.2.6
Web server Zeus/4.3
Global Redirect 6.x-1.2
Path enabled
Pathauto installed not enabled
Hi,
I am also getting redirect loops. All running ok now that GR has been disabled, after having not been able to access the site . Now, when I try to enable the module, it causes the same problem, not even going through the 'save configuration' process. Thanks.
#8
It could be related to the web server. I am running nginx. Is anyone running Apache encountering this issue?
#9
Confirming the Redirect Loop issue in Drupal 6.12 with Global Redirect 6.x-1.2 and Pathauto 6.x-2.x-dev on Apache.
Turn Global Redirect OFF and all is OK again.
Edit: added reference to Apache.
#10
I'm using Global Redirect 6.x-1.x-dev with Pathauto enabled, and I'm not having the Redirect Loop issues. However, I don't believe my Pathauto and Drupal core are up-to-date right now (my site is in development).
That said, the dev version appears to have fixed this problem.... so are we planning to roll this fix into the official release?
#11
Drupal 6.12
MySQL database 5.0.51a
PHP 5.2.6
Web server Zeus/4.3
Global Redirect 6.x-1.x-dev
I have installed GR 6.x-1.x-dev and had the same problem as before: redirect loop. Deleted the module via ftp as I could not access the site.
#12
I notice one case it will loop:
A url rewrite is added in .htaccess to add a slash at end of the language prefix, such as to change http://domain.com/en to http://domain.com/en/
Because globalredirect will remove the end slash after language prefix regardless if the 'deslash' option is on of off.
I have made a patch to preven globalredirect from removing the end slash after language prefix.
http://drupal.org/node/481690
#13
This module is missing critical updates that happened between Drupal 5 and 6:
1. It completely ignores language in calls to drupal_get_path_alias() and the $alias_sensitive query
2. custom_url_rewrite() was formerly triggered by drupal_get_path_alias(), since D6 you have to do it manually (see url() function as reference).
By not correctly re-assembling the URL to compare to, this module breaks other modules like Sub-path URL aliasing (issue).
#14
seems that this patch still haven't made to dev version :(
#15
Patch fixes the issue for me (using Sub-path URL), thanks.
#16
thanks smk-ka
I was having problem when Global Redirect and Subdomain modules are together.
Patch in #13 works for me too.
#17
Tested and working fine.
I had problems with subpath_alias module and now it works fine.
#18
I'll try to commit this patch to 6.x-dev this weekend.
Cheers for all the reviews guys!
Nick
#19
Works great ! Thanks !
#20
This patch doesn't fix the problem when used with PURL, as in #527490: PURL + Path Aliases = Redirect loop, in fact it makes it a little worse.
#21
Tested on D6.13 with:
path.module
subpath_alias.module
url_alter.module
Also tested with hardcore aliases:) admin/* -> panel/*, node/* -> contents/*… altered subpaths:
/panel/build/menu (/admin/build/menu)
/panel/build/block (/admin/build/block)
…
all many others work fine!
Thanks a lot!!!
#22
Patch #13 works for me.
Tested with:
Drupal 6.13
pathauto 6.x-1.1
globalredirect 6.x-1.2
subpath_alias 6.x-1.0
#23
Hey people, I am having issues too with:
Drupal 6.13
pathauto 6.x-1.1
globalredirect 6.x-1.x-dev or 6.x-1.2
subpath_alias 6.x-1.0
Is this patch included in latest dev build (6.x-1.x-dev, 2009-Jun-12)?
If not, how do I apply it?
Can it only be applied on 6.x-1.2 or does it also work on 6.x-1.x-dev?
Can anyone provide an already patched version of either the dev build or the 6.x-1.2 pretty please?
#24
Patch #13 works for me.
Tested with:
Drupal 6.13
pathauto 6.x-1.1
globalredirect 6.x-1.2
subpath_alias 6.x-1.0
url alter 6.x-1.0
Path redirect 6.x-1.0-beta4
To apply patch manually: http://drupal.org/node/534548
#25
Patch #13 works for me.
Tested with:
Drupal 6.12
pathauto 6.x-1.1
globalredirect 6.x-1.2
subpath_alias 6.x-1.0
url alter 6.x-1.0
Thanks a lot!!!
#26
#13 works!
Drupal 6.13
globalredirect 6.x-1.x-dev
pathauto 6.x-1.x-dev
subpath_alias 6.x-1.0
url_alter 6.x-1.1
Thanks!
#27
Applying the patch in #13 resolved the issue for me as well. I guess we're listing our module versions here so:
Drupal 6.14
Global Redirect 6.x-1.2
Path Redirect 6.x-1.0-beta4
Pathauto 6.x-1.1
URL alter 6.x-1.1
Sub-path URL Aliases 6.x-1.0
#28
patch attached to #13 works for me too.
Drupal 6.14
Global Redirect 6.x-1.2
Path Redirect 6.x-1.0-beta4
Pathauto 6.x-1.1
URL alter 6.x-1.1
Sub-path URL Aliases 6.x-1.0
#29
Subscribing....
#30
subs
#31
Can someone try with some revised logic that matches how the url rewriting works in D7?
$original_request = $request;
if (function_exists('custom_url_rewrite_outbound')) {
// Modules may alter outbound links by reference.
custom_url_rewrite_outbound($request, $options, $original_request);
}
// Aliases should always take precendence over any altered URLs.
$alias = drupal_get_path_alias($original_request, $options['language']->language);
if ($alias != $original_request) {
$request = $alias;
}
#32
Patch? I'm not exactly sure if should modify or replace the patch provided, so I'm hesitant to vouch for it, but it makes sense.