NYCPHP Meetup

NYPHP.org

[nycphp-talk] Removing www.

inforequest 1j0lkq002 at sneakemail.com
Wed Feb 7 20:53:58 EST 2007


Chris Shiflett shiflett-at-php.net |nyphp dev/internal group use| wrote:

>Joseph Crawford wrote:
>  
>
>>Hey guys, what would i need to do in order to make all of the
>>www. be removed from my urls?
>>    
>>
>
>>From http://no-www.org/:
>
>RewriteEngine On
>RewriteCond %{HTTP_HOST} ^www\.josephcrawford\.com$ [NC]
>RewriteRule ^(.*)$ http://josephcrawford.com/$1 [R=301,L]
>
>Hope that helps.
>
>Chris
>
>  
>
ummm..... be careful when taking code snippets and standards advice from 
a site that doesn't validate and is broken in IE7. Especially when it 
promotes a back link campaign IMHO.

However, the code looks correct if that is what you want to do. I would 
also make sure that the site is not spiderable via https: so that you 
don't get traffic bypassing your rewrite rule (or perhaps a port 443 
check to the rewrite rule).

-=john andrews

-- 
-------------------------------------------------------------
Your web server traffic log file is the most important source of web business information available. Do you know where your logs are right now? Do you know who else has access to your log files? When they were last archived? Where those archives are? --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com




More information about the talk mailing list