Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here is trouble: When i follow this link - it rewrites to and i got Error 310 (net::ERR_TOO_MANY_REDIRECTS)

This happend when i start using fast-cgi insteed of mod_php Here is my .htaccess:

ErrorDocument 404 "The requested file favicon.ico was not found.

DirectoryIndex index.php

<IfModule mod_php4.c>

<IfModule sapi_apache2.c>

<IfModule mod_php5.c>

<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresDefault A1209600
  ExpiresByType text/html A1

<IfModule mod_rewrite.c>
  RewriteEngine on

RewriteRule ^(.*)$$1 [L,R=301]

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ ru/index.php?q=$1 [L,QSA]
share|improve this question
Are you using mod_fastcgi with Apache? Also, is there a reason you're loading php4 and php5? – nojak Nov 21 '12 at 22:03

The following line causes that behavior:

RewriteRule ^(.*)$$1 [L,R=301]

This says, for any request containing any characters (or none at all), redirect it to, followed by the requested URL. If this site is, itself,, then that means that a request for /ru/ will be converted to ru/ (since we're in an effective <Directory> context due to .htaccess), which will in turn send us to From there, you can easily imagine what happens on the next round when the request for /ru/ru/ comes in.

It's hard to imagine what you're trying to do with this line, so I confess that I don't really know how to "fix" it. If you can share your intention, I'm happy to offer a solution.

share|improve this answer

Your Answer


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.