Question : Forward one domain to another under Lighttpd

I have two domains dealing with the same organization, and I would like one to forward to the other one, permanently (301 HTTP response).  I have this figured out with Apache (attached as code).  I also have a snippet of my lighttpd.conf file that allows both domains to be mirrored, but I don't want this.

I appreciate any help you guys may have.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
APACHE::
 
   RewriteEngine On
   RewriteCond %{HTTP_HOST} ^(waterfortheoppressed.com) [NC]
   RewriteRule ^(.*)$ http://www.wfto.cc$1 [R=301,L]
 
   RewriteCond %{HTTP_HOST} ^(www.waterfortheoppressed.com) [NC]
   RewriteRule ^(.*)$ http://www.wfto.cc$1 [R=301,L]
 
LIGHTTPD::
 
$HTTP["host"] =~ "^(waterfortheoppressed\.com)|((www\.)?waterfortheoppressed\.com)$" {
  server.document-root = "/var/www/wfto.cc"
  url.redirect = (
    "^/(.*)" => "http://www.wfto.cc/$1",
    ""       => "http://www.wfto.cc/"
  )
}

Answer : Forward one domain to another under Lighttpd

The following solved my problem:

$HTTP["host"] =~ "^(www\.)?waterfortheoppressed\.com$" {
  url.redirect = (
    "^/(.*)$" => "http://www.wfto.cc/$1",
  )
}

Also, make double sure mod_redirect is enabled in your lighttpd.conf
Random Solutions  
 
programming4us programming4us