[Wylug-help] Fwd: Re: Fwd: Re: Apache .htaccess file.

Smylers Smylers at stripey.com
Mon Oct 19 11:44:34 UTC 2009


Stephen Patterson writes:

> Hope I'm not providing even more confusion, but these 4 lines work for
> me.
> 
>     RewriteEngine on
>     RewriteBase   /
>     RewriteCond %{HTTP_HOST}  !www.patter.me.uk
>     RewriteRule ^.*$     http://www.patter.me.uk%{REQUEST_URI} [R=301]

That's another slightly different way of doing it; that or what John
posted earlier should both work.  Douglas would need to include an [L]
at the end (and it's probably good practice to do so anyway), because he
has other rewrite stuff following, and we want this first bit to
redirect back through the browser and make a second request (with the
www) before continuing.

> Check that you've also got RewriteBase set appropriately.

Yeah, Doug had those in his first post.

Also, if they were missing/wrong the symptom would be redirection to the
wrong place, whereas Doug seems to be expieriencing no redirection at
all.

Smylers
-- 
http://twitter.com/Smylers2



More information about the Wylug-help mailing list