Posted By

therobot on 10/08/07


Tagged

apache configuration


Versions (?)

Who likes this?

11 people have marked this snippet as a favorite

arcturus
basicmagic
copyleft
vvarp
naz
wbowers
orhanveli
kurokikaze
dext
b1tstream
mprough


Apache redirect from domain.com to www.domain.com


 / Published in: Regular Expression
 

  1. RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
  2. RewriteCond %{HTTP_HOST} !^$
  3. RewriteRule ^/(.*) http://www.domain.com/$1 [L,R]

Report this snippet  

You need to login to post a comment.