Chinaunix

标题: nginx的location问题 [打印本页]

作者: kuaifeidao    时间: 2010-11-25 20:13
标题: nginx的location问题
我想问下大虾们,nginx里面的server下的location /    是匹配以/开头的字段对吧

server {
        listen       80;
        server_name  www.xxx.com;

        index index.html index.htm index.php;
        root  /var/www/html;
         ....
         ....
         ....
         ....
         ....
        location / {
                rewrite ^/(a|b|c|d)\.html$   /$1.php  last;                       
                rewrite ^/([0-9]+)$   /test.php?fid=$1 last;
                }
           }
这里面这个location的"/"是不是指/var/www/html
另外/test.php?fid=$1中“?”代表什么意思?
作者: kuaifeidao    时间: 2010-11-27 06:54
顶起来。。。
作者: shendaizhi    时间: 2010-11-29 12:06
/是指你 www.xxx.com/后面的根  ?特殊字符




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2