View Single Post

  #1 (permalink)  
Old 03-25-2007, 08:17 AM
muks muks is offline
Junior Member
User
 
Join Date: Mar 2007
Posts: 13
Rep Power: 0
muks
Default redirect to www in lighttpd

I tried this on my lighttpd.conf as stated in the tutorial but I can still access the mydomain.com (no www) URL

Code:
$HTTP["host"] == "^mydomain\.com$" {
server.document-root = "/home/mydomain/www"
server.errorlog = "/var/log/lighttpd/mydomain.com/error.log"
accesslog.filename = "/var/log/lighttpd/mydomain.com/access.log"
url.redirect = ( "^/(.*)" => "http://www.mydomain.com/$1" )
}
and both www and no-www redirects me now to the server.document-root of the whole server ("/var/www/html/") and not "/home/mydomain/www"

I've also activated the mod_redirect module

any ideas?
Reply With Quote