Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

If I have the following domains in lighttpd:

How do i redirect all these to to ''?

ie: redirects to and redirects to


share|improve this question

2 Answers 2

up vote 3 down vote accepted

Something like:

$HTTP["host"] =~ "||" {
  url.redirect = ( "^/(.*)" => "$1" )

should work - as covered in the man page ;)

share|improve this answer

Use mod_redirect as mentioned in the lighttpd docs. There are a number of examples that you can adapt.

share|improve this answer
I have and couldn't see a clear way todo this. – sleepyjames Jan 25 '10 at 10:23
All you'd need to do is modify the first example slightly. – sybreon Jan 25 '10 at 13:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.