Linux – lighttpd redirect certain links to certain urls

lighttpdlinuxredirectregex

Could someone tell me how / why is this redirect not working?

$HTTP["host"] =~ ".*\\.mydomain\\.com" { 
    url.redirect = ( 
        "/index\.php\?pg=mysql" => "http://mydomain.com/lean-webhosting/mysql-clustering/",
        "/index\.php\?pg=cloud_uitleg" => "http://mydomain.com/lean-webhosting/cloud-uitleg/" 
    )    
}

Someone any idea? THanks!

Best Answer

You probably need to replace ".*\\.mydomain\\.com" with ".*\.mydomain\.com" and restart lighttpd. If that doesn't help: please explain how the redirect isn't working for you.

Related Topic