rewrite
Vasyl Kondrashov
vasyl.kondrashov at gmail.com
Wed Sep 10 16:34:43 MSD 2008
Добрый день всем!
Пытаюсь перевести rewrite из:
#________________________________________________________________________________________
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/server-status$ [OR]
RewriteCond %{REQUEST_URI} ^/server-info$ [OR]
RewriteCond %{REQUEST_URI} ^/whm-server-status$
RewriteRule (.*) - [L]
RewriteRule ^$ index.php [L]
RewriteRule ^sso_endpoint.php/ui$
index.php/SSO/UI [L]
RewriteRule ^sso_endpoint.php/SAML$
index.php/SSO/Proxy [L]
RewriteRule ^sso_endpoint.php/signout$
index.php/SSO/Proxy [L]
RewriteCond %{REQUEST_URI} ^/[a-z]+/.*$
RewriteCond %{REQUEST_URI} [^/]$
RewriteRule (.*) - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php/$1 [QSA,L]
#__________________________________________________________________________________________
в понятную nginx форму. Последний вариант:
#__________________________________________________________________________________________
if ($request_uri ~ ^/server-status$) {
break;
}
if ($request_uri ~ ^/server-info$) {
break;
}
if ($request_uri ~ ^/whm-server-status$) {
break;
}
rewrite ^$ index.php last;
rewrite ^sso_endpoint.php/ui$ index.php/SSO/UI last;
rewrite ^sso_endpoint.php/SAML$ index.php/SSO/Proxy last;
if ($request_uri ~ ^/[a-z]+/.*$) {
break;
}
#if ($request_uri ~ [^/]$) {
#break;
#}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?$1$query_string break;
}
#__________________________________________________________________________________________
Не получается желаемого :(
Пробовал rewrite_log on; но не нашёл, куда он пишет :(
More information about the nginx-ru
mailing list