Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a (client) site located at http://internationalgateway.us/. We are using the WPML Multilingual CMS plugin. When choosing another language from the homepage (in this case French, since that's the only one enabled), I encounter a redirect loop. This can also be experienced just by visiting http://internationalgateway.us/fr. It appears as though an extra trailing slash is getting added to the url, triggering the loop. However, adding extra trailing slashes to any other url on the site does not cause the same behavior - it just results in a redirect to the page without the slashes.

I understand this may simply be a plugin issue, but I suspect that it is not, as the site was working fine previously. I'm wondering if this could be an issue with permalinks and/or .htaccess rules. Currently, my permalinks are set to /%category%/%postname%/, and the contents of the .htacess file are as follows:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
share|improve this question
    
there is also an incompatibility with the No Category base plugin –  user10178 Nov 10 '11 at 16:37
add comment

2 Answers

Your site is misconfigured, but from remote it's not easy to say where exactly. For the redirects, it's going this way:

  1. requesting http://internationalgateway.us/fr
  2. 301 redirect to http://internationalgateway.us/fr//
  3. requesting http://internationalgateway.us/fr//
  4. 301 redirect to http://internationalgateway.us/fr/
  5. requesting http://internationalgateway.us/fr/
  6. go to 2.

This is the redirect loop your page creates unrolled.

To debug this, you can make use of a command-line utility called curl:

# curl -i http://internationalgateway.us/fr/
HTTP/1.1 301 Moved Permanently
Date: Mon, 07 Feb 2011 22:42:24 GMT
Server: LiteSpeed
Connection: close
Set-Cookie: _icl_current_language=fr; expires=Tue, 08-Feb-2011 22:42:24 GMT; path=/
X-Pingback: http://internationalgateway.us/xmlrpc.php
Content-Type: text/html; charset=UTF-8
Location: http://internationalgateway.us/fr//
Content-Length: 0

It does not look like a server misconfiguration as those redirects are triggered by wordpress.

I already gave some wordpress redirect debugging tricks here: Infinite loop problem with the WordPress MU Domain Mapping plug-in. There is a Firefox add-on that prevents automatic redirects NoRedirect 1.2.4 Toolpress Strict Edition (Firefox Add-On) and a WordPress plugin that can be easily hacked to add debug information to redirects: Better HTTP Redirects (Wordpress Plugin). Probably the info there and those tools are helpful for you to find which plugin / code is triggering the redirect(s).

As a quick shot you can try if Normalize URLs (Wordpress Plugin) helps, but I think not directly for your case. But it might be of general use for you.

share|improve this answer
add comment
up vote 1 down vote accepted

I've discovered that the problem is an incompatibility between the WPML plugin and the Yoast WordPress SEO plugin. Specifically, enabling the "Redirect ugly URL's to clean permalinks" setting in the SEO plugin causes the redirect loop. I've contacted the plugin authors to inform them of the incompatibility and will try to help in getting the issue addressed with those two plugins.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.