Lighttpd redirect all requests to new domain/host

To redirect all requests to new domain add following condition in your lighttpd.conf and restart lighttpd.

Here in the example I am trying to redirect all requests coming to to

$HTTP["host"] =~ "www\.dummy\.com$" {

url.redirect = ( "^/(.*)" => "" )


After adding above rule restart lighttpd.

$ service lighttpd restart

Now open the browser and type and it should automatically redirected to

In above example according to your requirement change the domain/host names and test.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s