Looking for rewrite rules

TommyGFX nginx-forum at nginx.us
Thu May 7 22:54:19 MSD 2009


Hallo,



location / {
    rewrite ^(+)/robots\.txt$ robots.txt last;
    rewrite ^members/page([0-9]+).html$ index.php?page=$1 last;
    rewrite ^whatsnew/entries/([0-9]+)/page([0-9]+).html$ browsecategory.php?do=newentries&cutoffdate=$1&page=$2 last;
    rewrite ^whatsnew/entries/(([0-9]?|-)+/?)$ browsecategory.php?do=newentries&cutoffdate=$1 last;
    rewrite ^whatsnew/posts/([0-9]+)/page([0-9]+).html$ browsecategory.php?do=newposts&cutoffdate=$1&page=$2 last;
    rewrite ^whatsnew/posts/(([0-9]?|-)+/?)$ browsecategory.php?do=newposts&cutoffdate=$1 last;
    rewrite ^whatspopular/(+)/$ browsecategory.php?do=popentries&orderby=$1 last;
    rewrite ^members/(+)/page([0-9]+).html$ browsecategory.php?do=member&userrewrite=$1&page=$2 last;
    rewrite ^members/((|-)+/?)$ browsecategory.php?do=member&userrewrite=$1 last;
    rewrite ^(+)/members/(+)/page([0-9]+).html$ browsecategory.php?userrewrite=$2&catrewrite=$1&page=$3 last;
    rewrite ^(+)/members/((|-)+/?)$ browsecategory.php?userrewrite=$2&catrewrite=$1 last;
    rewrite ^(+)/((|-)+)/$ showentry.php?entryrewrite=$2&catrewrite=$1 last;
    rewrite ^(+)/(+)/page([0-9]+).html$ showentry.php?entryrewrite=$2&catrewrite=$1&page=$3 last;
    rewrite ^(+)/(+)/epage([0-9]+).html$ showentry.php?entryrewrite=$2&catrewrite=$1&epage=$3 last;
    rewrite ^(+)/page([0-9]+).html$ browsecategory.php?catrewrite=$1&page=$2 last;
    rewrite ^(+)/?$ browsecategory.php?catrewrite=$1 last;
}




Das Sollte funktionieren wenn nicht mal fehler meldung.

Kommt in die config vom nginx

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,1853,1861#msg-1861






More information about the nginx mailing list