On 2 Mar 2005 14:31:07 -0800,
"Geoff Soper" <geoff.google.nospam@alphaworks.co.uk> posted:
> At the moment my website is visible with the www. prefix and without
> (http://www.geoffsoper.co.uk and http://geoffsoper.co.uk), is there any
> way I can divert people requesting
> http://geoffsoper.co.uk/anything_at_all to
> http://www.geoffsoper.co.uk/anything_at_all using directives in
> .htaccess files? I have mod_rewrite available to me.
I've just done the opposite with my website (I have a really short domain
name, and wanted to keep it that was so I can print it in tight spaces).
This trick (like below) worked for me with removing the
www., so I've
reversed it to insist on the www. but not tested it. Try this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^geoffsoper\.co\.uk$ [NC]
RewriteRule ^(.*)$ http://www.geoffsoper.co.uk/$1 [R=301,L]
--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.
This message was sent without a virus, please delete some files yourself.