You are here: Re: FrontPage? « HTML « IT news, forums, messages
Re: FrontPage?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация