0 Replies - 822 Views - Last Post: 28 July 2007 - 09:00 AM

#1 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1949
  • View blog
  • Posts: 20,376
  • Joined: 17-March 01

.htaccess mod_rewrite to direct www to non-www

Posted 28 July 2007 - 09:00 AM

Description: Paste this in a .htaccess file and upload to your web root. Works in ApacheThis snippet redirects your www. traffic to a non-www domain.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]

Is This A Good Question/Topic? 0
  • +

Page 1 of 1