Thursday, February 8, 2007

lighttpd canonical hosts (non-www to www redirect)

This will redirect http://domin.com to http://www.domain.com/ with 301 code

$HTTP["host"] == "domain.com" {
url.redirect = ( "^/(.*)" => "http://www.domain.com/$1" )
}

0 comments: