Forum: NGINX 请问这个规则如何转换

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
杨廷勇 (Guest)
on 2009-03-04 10:27
(Received via mailing list)
RewriteBase /
RewriteCond %{REQUEST_URI}    !\.(gif|jpeg|png|jpg|bmp)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]

如何转换成nginx的rewrite规则

谢谢大家
Big B. (Guest)
on 2009-03-05 01:42
杨廷勇 wrote:
> RewriteBase /
> RewriteCond %{REQUEST_URI}    !\.(gif|jpeg|png|jpg|bmp)$
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . index.php [L]
>
> 如何转换成nginx的rewrite规则
>
> 谢谢大家
这里懂中文的很少,还是用英文提问吧
杨廷勇 (Guest)
on 2009-03-05 06:05
(Received via mailing list)
我英文水平有限,谁能帮我译一下,谢谢




在2009-03-05,"Big Bet" <removed_email_address@domain.invalid> 写道:
Weibin Y. (Guest)
on 2009-03-05 07:47
(Received via mailing list)
These are rewrite rules for apache:

RewriteBase /
RewriteCond %{REQUEST_URI}    !\.(gif|jpeg|png|jpg|bmp)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]

How to change these rules for nginx?
Igor S. (Guest)
on 2009-03-05 07:58
(Received via mailing list)
On Thu, Mar 05, 2009 at 01:38:45PM +0800, Weibin Y. wrote:

> These are rewrite rules for apache:
>
> RewriteBase /
> RewriteCond %{REQUEST_URI}    !\.(gif|jpeg|png|jpg|bmp)$
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule . index.php [L]
>
> How to change these rules for nginx?

If you use FastCGI and nginx 0.7.x:

location / {
    try_files      $uri  $uri/  @php;
}

location ~ \.(gif|jpe?g|png|bmp)$ {
}

location @php {
    fastcgi_pass   ...;

    fastcgi_param  SCRIPT_FILENAME  /path/to/index.php;

    ... other fastcgi_param
}
Denis F. Latypoff (Guest)
on 2009-03-05 10:53
(Received via mailing list)
Hello 杨廷勇,

Thursday, March 5, 2009, 9:55:01 AM, you wrote:

> 我英文水平有限,谁能帮我译一下,谢谢

ما الذي تتحدث عنه؟

> 
在2009-03-05,"Big燘et"?lt;removed_email_address@domain.invalid>犘吹溃?>杨廷勇爓rote:
>>>燫ewriteBase?
>>>燫ewriteCond?{REQUEST_URI}牋牋!\.(gif|jpeg|png|jpg|bmp)$
>>>燫ewriteCond?{REQUEST_FILENAME}?-f
>>>燫ewriteCond?{REQUEST_FILENAME}?-d
>>>燫ewriteRule?爄ndex.php燵L]
>>>?>>犎绾巫怀蒼ginx的rewrite规则
>>>?>>犘恍淮蠹?>这里懂中文的很少,还是用英文提问吧
>>--?>Posted爒ia爃ttp://www.ruby-forum.com/.
>>
Terence Lee (Guest)
on 2009-03-05 11:29
(Received via mailing list)
Hi 杨廷勇,

Try this.

http://translate.google.com/translate_t#

Terence
This topic is locked and can not be replied to.