rewrite的问题
#error_page 404 /404.html;#Custom rules Start
rewrite ^/debs/([^/]+) /downloads.php?request=$1;
rewrite ^/(Release)$ /lists.php?request=Release;
rewrite ^/(Packages)$ /lists.php?request=Packages;
rewrite ^/(Packages\.gz)$ /lists.php?request=Packages.gz;
rewrite ^/(Packages\.bz2)$ /lists.php?request=Packages.bz2;
rewrite ^/(rewritetest)$ /robots.txt;
rewrite ^/view/(+)(.*) /index.php?method=view&pid=$1;
rewrite ^/view/(+)/nohistory /index.php?method=view&pid=$1&addr=nohistory;
rewrite ^/screenshot/(+)(.*) /index.php?method=screenshot&pid=$1;
rewrite ^/history/(+)(.*) /index.php?method=history&pid=$1;
rewrite ^/contact/(+)(.*) /index.php?method=contact&pid=$1;
rewrite ^/section/(+)(.*) /index.php?method=section&pid=$1;
rewrite ^/report/(+)/(+)(.*) /index.php?method=report&pid=$1&support=$2;
rewrite ^/report/(+)(.*) /index.php?method=report&pid=$1;
rewrite ^/more/(+)/(+)(.*) /index.php?method=more&pid=$1&offset=$2;
rewrite ^/more/(+)(.*) /index.php?method=more&pid=$1;
rewrite ^/more/(+)(.*) /index.php?method=more&pid=$1;
rewrite ^/(misc)$ /misc.php; #Custom rules End
location ~ [^/]\.php(/|$)
{
# comment try_files $uri =404; to enable pathinfo
try_files $uri =404;
fastcgi_passunix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
#include pathinfo.conf;
}
rewrite放这 怎么没有生效啊。0.0 放的位置没错,只要伪静态没问题,重启nginx就能生效
回复 2# 的帖子
我用include了,好了,谢谢
页:
[1]