I have a site where the default language is Vietnamese, then I've enabled translation w/ the "/en/" prefix.

After enabling Global redirect, whilst developing on laptops (WAMP or XAMPP) is file, when testing on the server where Apache's been replaced with nginx, I am getting redirect loops for all /en/ pages (except admin - disabled in settings). Meaning I can query "curl -I http://server/en" and it will repeatedly 301 me to the same Location.

Attached is a patch that fixes it for me. I've tried the patches in http://drupal.org/node/1317142 (it's for D7 anyways) to no avail.

There are two cases which are fixed, one where the url is and one where it's not.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nicholasThompson’s picture

I'm not really sure I understand the patch; it looks like its been generated by SVN against your own repo/working copy...

Is it basically saying:

if ($_REQUEST['q'] != $prefix . $alias) {

to

if ($_REQUEST['q'] != $alias && $_REQUEST['q'] != $prefix . $alias) {
tomotomo’s picture

It looks like the patch got corrupted. Let me try again. (Yes, it's coming from a local svn)

bofrost’s picture

Status: Active » Reviewed & tested by the community

The patch works great! Thank you.

The problem exist now for years and still there is no stable version for 6.x where this is adapted... please port the patch!

(BTW. This effect starts on my site after enabling xml sitemap module.)