Posted By

steho on 07/31/10


Tagged

htaccess


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

kubaitis


Changes domainname.tld into www.domainname.tld


 / Published in: Apache
 

Changes domainname.tld into www.domainname.tld

  1. ## Changes domainname.tld into www.domainname.tld
  2. Options +FollowSymLinks
  3. RewriteEngine On
  4. RewriteBase /
  5. RewriteCond %{HTTP_HOST} !^www\.domainname\.com$ [NC]
  6. RewriteRule ^(.*)$ http://www.domainname.com/$1 [R=301]
  7. RewriteRule ^(.*)\.html$ $1.php [R=301,L]

Report this snippet  

You need to login to post a comment.