服务器技术

 首页 > 服务器技术 > nginx > Nginx重定向的配置实例_nginx_自学php网

Nginx重定向的配置实例_nginx_自学php网

分享到:
【字体:
导读:
          基于Nginx的服务器需要设置下重定向,下面的b2c就是相对应的目录,需要的朋友可以参考下。...

在/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了。
分享到:
Nginx中全局变量整理小结_nginx_自学php...
Variables The core module supports built-in variables, whose names correspond with the names of variables in Apache. First of all, there are the variables, which represent the lines of the title of the client request, for example, $http_user_agent, $http_cookie, and so forth. Furthermore, there a...
基于Xen的VPS ubuntu+nginx+php安装教程_...
因为对系统性能要求很低,所以选择了Link-1,2.5G硬盘、64M内存、100GB流量、1个独立ip。使用优惠码9DMM7R可以有10%的折扣,vpslink.com。当然也可以找更大折扣的优惠码,但是一般只限3个月内。在vpslink后台安装os,选择ubuntu9.04,一分钟后系统装完了,ssh登录root。工作1:配置web服务器为了调试程序,支持php的web服务...
  •         php迷,一个php技术的分享社区,专属您自己的技术摘抄本、收藏夹。
  • 在这里……