Mod rewrite übersetzung: Apache > Lighttpd

Apache, Lighttpd, nginx, Cherokee
malo
Posts: 61
Joined: 2005-01-03 22:40

Mod rewrite übersetzung: Apache > Lighttpd

Post by malo » 2008-03-26 18:29

hi habe folgenden Apache MOd Rewrite code:

Code: Select all

RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301]


bekomm es abe rnicht hin, ihn "lighttpd" konform umzuwandeln.
kann mir da einer helfen?

vielen dank

User avatar
Joe User
Project Manager
Project Manager
Posts: 11137
Joined: 2003-02-27 01:00
Location: Hamburg

Re: Mod rewrite übersetzung: Apache > Lighttpd

Post by Joe User » 2008-03-26 19:22

Code: Select all

    $HTTP["host"] =~ "(^|.)domain.tld$" {
        $HTTP["host"] != "www.domain.tld" {
            url.redirect = (
                "^/(.*)" => "http://www.domain.tld/$1",
            )
        }
        $HTTP["host"] == "www.domain.tld" {
            # ...
        }
    }
PayPal.Me/JoeUserFreeBSD Remote Installation
Wings for LifeWings for Life World Run

„If there’s more than one possible outcome of a job or task, and one
of those outcomes will result in disaster or an undesirable consequence,
then somebody will do it that way.“ -- Edward Aloysius Murphy Jr.