Re: www. not working

From: Date: Sat, 16 Feb 2008 03:00:57 +0000
Subject: Re: www. not working
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-269398@lists.php.net to get a copy of this message
Jim Lucas wrote:
If you are running Apache, you do realize that all of this can be done in Apache instead of PHP right?
.htaccess example: # Power-up the rewrite engine: RewriteEngine on # Redirect all non-www traffic: RewriteCond %{HTTP_HOST} ^mysite\.com [NC] RewriteRule ^/?(.*)$ http://www.mysite.com/$1 [R=301,L]\ I like to always redirect to www or non-www... not both. I have read that this is good for SEO and/or SE's. Cheers, Micky -- Wishlist: <http://tinyurl.com/22xonb> Switch: <http://browsehappy.com/> BCC?: <http://snipurl.com/w6f8> My: <http://del.icio.us/mhulse>

« previous php.general (#269398) next »