nginx服务器的rewriter有木有?

#1 anythink

求详细规则介绍!

该贴已经同步到 anythink的微博

2011-09-22 18:03:58

#2 anythink

还有IIS的 规则是啥???

2011-09-22 18:04:18

#3 anythink

[ISAPI_Rewrite] 
Defend your computer from some worm attacks
RewriteRule .*(?:global.asa|default.ida|root.exe|..).* . [F,I,O]
RewriteRule /attachs/(.*) /attachs/$1 [L]
RewriteRule /avatar/(.*) /avatar/$1 [L]
RewriteRule /tpl/(.*) /tpl/$1 [L]
RewriteRule /tmp/(.*) /tmp/$1 [L]
RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /favicon.ico /favicon.ico [L]
RewriteRule ^/$ /index.php [L]
RewriteRule /(.*) /index.php/$1 [L]

2011-09-22 18:04:50

#4 anythink

这个貌似不好用

2011-09-22 18:05:03

#5 anythink

NGINX的找到了

 
location /
{
try_files $uri $uri/ /index.php?q=$uri&$args;
}


2011-09-22 18:16:42

#6 site580

规则不管用啊 :Q

2012-10-09 16:15:26

#7 jake

site580 发表于 2012-10-9 16:15
规则不管用啊
可以参考wordpress在nginx下的规则

2012-10-09 17:48:45

#8 site580

试了wordpress规则还是不行 :Q

2012-10-10 23:48:25

#9 jake

site580 发表于 2012-10-10 23:48
试了wordpress规则还是不行
只能说是你程序有不同的做法了。

speedphp的rewrite规则和wordpress是一模一样的,请参考spUrlRewrite文件。

2012-10-11 08:28:16

#10 site580

我知道了 是我的程序配置问题 。。:'(

2012-10-11 10:08:56

#11 anythink

-。- 发现整个主题都是我莫名其妙的回复~ 然后规则就有了 -。-

2012-10-12 11:12:41