Posted by Mark Parnell on 09/14/05 03:03
Previously in alt.html, WD10 <nospam@nospam.invalid> said:
> I am trying to set up a site so that the
> http://my_site.com version of the domain redirects to the
> http://www.my_site.com version.
Why? Better to go the other way around IMHO. http://no-www.org/
> # Sends all requests to www version of domain name
RewriteEngine On
> RewriteCond %{HTTP_HOST} ^my_site.com
> RewriteRule (.*) http://www.my_site.com/$1 [R=301,L]
The following is what works for me:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
--
Mark Parnell
http://clarkecomputers.com.au
alt.html FAQ :: http://html-faq.com/
Navigation:
[Reply to this message]
|