Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rewrite
- To: nginx-ru@xxxxxxxxx
- Subject: rewrite
- From: "Vasyl Kondrashov" <vasyl.kondrashov@xxxxxxxxx>
- Date: Mon, 8 Sep 2008 13:21:38 +0300
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=OkfhAnorUI4fK+tbah23zWWKLXpmbp0mMvSO9Rlp5mk=; b=Q3WbnIdRwkL3FYGuttQ7qWlkF11YfYp2SjAwrXsUfs9f3E07JAfKc2arXqXdPQ4h/s pC3tBuDHNf1ZhQVsEPAwmlgWdUUuUuh6wh3KsOKMkj3rH9nK78HGoaIPViAWRyKFnrR4 ExdUW5jdqEvSPxYQsyTHbh+1P5kJwXoNod7xw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=WUJezwApUCaursHVezKK+ItkYH4N5xg+yukmC976IF/YL1SueajCe5teQSIoDuCEum nm9eUoiTi31TE+Wsxr6WBQp7JjFqhtr+8qsORNLyvQSAHaDKkGq199qcoAsS9uk19Znn +NhzVuqs0dA9dPsLhKttUrBGzNk7kwfwOMOw8=
Пытаюсь перевести 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
break;
}
#__________________________________________________________________________________________
Перевод не дословный, но не это важно. При попытке открыть адрес
http://server/Login пишет 404 - not found, а по идее - должно rewrite
на http://server/index.php?Login
nginx version: nginx/0.6.31, fast-cgi
Чувствую, что грабли рядом, а никак не найду :(
|