Re: www. not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux