2 Replies - 1028 Views - Last Post: 12 September 2008 - 04:28 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 non-www to www

Posted 28 July 2007 - 08:50 AM

Description: Paste this code in a .htaccess file in your web root. This works for Apache web servers. Google treats non-www and www as separate sites. They recommend using redirect to send all traffic to the URL you want to use. This will also redirect all domain variations to the domain of your choice (i.e. .us to .com, .cc to .com, .org to .com)
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^dreamincode.(.*)
RewriteRule ^(.*)$ http://www.dreamincode.net/$1 [R=301,L]


Is This A Good Question/Topic? 0
  • +

Replies To: .htaccess mod_rewrite to direct non-www to www

#2 MarkoDaGeek  Icon User is offline

  • Dirty Technophile
  • member icon

Reputation: 13
  • View blog
  • Posts: 11,158
  • Joined: 13-October 01

Re: .htaccess mod_rewrite to direct non-www to www

Posted 02 November 2007 - 05:18 AM

Works like a charm! Thanks Chris.
Was This Post Helpful? 0
  • +
  • -

#3 sivabalansofiaakka  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 0
  • Joined: 12-September 08

Re: .htaccess mod_rewrite to direct non-www to www

Posted 12 September 2008 - 04:28 AM

How to create a virus program in visual basic.6.0.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1