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.
5032363ab6ccdfe0939522c6499f4326?d=identicon&s=25 杨廷勇 (Guest)
on 2009-03-04 09: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规则

谢谢大家
2dac4384238ef183a10fadf10ed6968c?d=identicon&s=25 Big Bet (bigbet)
on 2009-03-05 00: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规则
>
> 谢谢大家
这里懂中文的很少,还是用英文提问吧
5032363ab6ccdfe0939522c6499f4326?d=identicon&s=25 杨廷勇 (Guest)
on 2009-03-05 05:05
(Received via mailing list)
我英文水平有限,谁能帮我译一下,谢谢




在2009-03-05,"Big Bet" <lists@ruby-forum.com> 写道:
B2292bc358490b3ae2a4a9caf36e2120?d=identicon&s=25 Weibin Yao (Guest)
on 2009-03-05 06: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?
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-03-05 06:58
(Received via mailing list)
On Thu, Mar 05, 2009 at 01:38:45PM +0800, Weibin Yao 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
}
0c31ca11d92038571de52b53c8ad4a8a?d=identicon&s=25 Denis F. Latypoff (Guest)
on 2009-03-05 09:53
(Received via mailing list)
Hello 杨廷勇,

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

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

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

> 在2009-03-05,"Big燘et"?lt;lists@ruby-forum.com>犘吹溃?>杨廷勇爓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/.
>>
8e714e0b7da3346ae528d5e582172752?d=identicon&s=25 Terence Lee (Guest)
on 2009-03-05 10: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.