.htaccess - Too many redirects

Posted by Knocks X on Server Fault See other posts from Server Fault or by Knocks X
Published on 2012-07-22T17:13:48Z Indexed on 2014/08/20 4:23 UTC
Read the original article Hit count: 319

Filed under:

I am getting a "too many redirects" error from the following two .htaccess files.

.htaccess on domain 1

Redirect 301 / http://www.domain2.com/

.htaccess on domain 2

RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [L,R]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /forum/ [L,R]

RedirectMatch permanent ^/$ /forum/

# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} badsite1\.com [NC,OR]
RewriteCond %{HTTP_REFERER} badsite2\.com [NC]
RewriteRule .* - [F] 

Anyone know the reason for the too many redirects error?

© Server Fault or respective owner

Related posts about .htaccess