Konvertierung .htaccess zu Nginx

Apache, Lighttpd, nginx, Cherokee
jochen35
Posts: 9
Joined: 2014-08-27 13:58

Konvertierung .htaccess zu Nginx

Post by jochen35 » 2014-09-12 21:55

Hallo,

könnt Ihr bitte mal drüber schauen, ob die Konvertierung passt.

.htaccess

Code: Select all

RewriteCond %{REQUEST_METHOD} !^(GET|POST)$
RewriteRule ^$            /index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
RewriteRule ^addressbooks /index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
RewriteRule ^calendars    /index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
RewriteRule ^principals   /index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
RewriteRule ^webdav       /index.php?frontend=webdav [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]



Nginx-Konfiguration

Code: Select all

if ($request_method !~ "^(GET|POST)$"){
    rewrite ^/$ /index.php?frontend=webdav;
    rewrite ^/addressbooks /index.php?frontend=webdav;
    rewrite ^/calendars /index.php?frontend=webdav;
    rewrite ^/principals /index.php?frontend=webdav;
    rewrite ^/webdav /index.php?frontend=webdav;
}



Gruß
Jochen

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

Re: Konvertierung .htaccess zu Nginx

Post by Joe User » 2014-09-13 01:30

Müsste passen, allerdings fehlt mindestens noch HEAD in der Regex der Request-Methods ;)
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.