[HCoop-Help] Domtool redirect: with www to without www keeping file path

Davor Ocelic docelic at hcoop.net
Thu Apr 9 12:18:01 EDT 2009

On Thu, 9 Apr 2009 17:12:16 +0100
Michal <michalcharemza at gmail.com> wrote:

> Ok... I spoke too soon. It seems to work at first, but now I get a
> 'too many redirects' error.

If I was following your previous mails correctly, my guess is
that visiting


works like expected, but then your regex rewrite rule is written
in a way that it rewrites both www.yoursite and yoursite.

So what happens is a loop like this:

www.yoursite -> yoursite -> yoursite -> yoursite...

You need to improve 

rewriteRule "^(.*)$" "http://mydomain.com$1"

in a way that it only redirects addresses that
contain www.yoursite; in other cases you must not do 
a rewrite or you end up in a loop.

Tell us how it goes.


More information about the HCoop-Help mailing list