服务器 
首页 > 服务器 > 浏览文章

Nginx重定向的配置实例

(编辑:jimmy 日期: 2024/9/20 浏览:3 次 )
在/usr/local/nginx/conf/nginx.conf中:

server

{

...

##begin add by guozhenbin 20100727
location /b2c/
{
if (!-e $request_filename) {
rewrite ^/b2c/(.*)$ /b2c/index.php?$1 last;
}
}
##end add by guozhenbin 20100727

...

}

/usr/local/nginx/sbin/nginx -s reload

重启无效。



后来将b2c/去掉,OK了。
上一篇:Apache 多端口多站点配置方法
下一篇:让Apache支持Rewrite静态页面重写的方法
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 SiteMap