Java Mailing List Archive

http://www.apache-httpd.com/

Home » users.httpd »

[users@httpd] Avoid endless loop of mod_rewrite

Michael Menegakis

2010-03-08

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi all

A rule is in place that that rewrites domains to www.domains

In one particular home dir, I need the opposite,

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]

But it goes into an endless loop that eventually makes firefox spit

'The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for
this address in a way that will never complete.'

How to ignore the higher level rule?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@(protected)
 "  from the digest: users-digest-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.