rewrite

Igor Sysoev is at rambler-co.ru
Thu Sep 11 10:36:47 MSD 2008


On Wed, Sep 10, 2008 at 03:34:43PM +0300, Vasyl Kondrashov wrote:

> Пытаюсь перевести 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;
> }
>  #__________________________________________________________________________________________
> 
> Не получается желаемого :(

http://www.lexa.ru/nginx-ru/msg19328.html

> Пробовал  rewrite_log on; но не нашёл, куда он пишет :(

error_log  /path/to/error_log notice;


-- 
Игорь Сысоев
http://sysoev.ru





More information about the nginx-ru mailing list