nginx 的rewrite

www.bzbw.net 
打开http://www.bzbw.net/211.html就是404 该怎么配置啊location / {
        index index.html index.php;
            rewrite ^/([0-9]+)\.html$ /?p$1;
      
    }-----------------------------------------------------------------------------------------------------
2,这个配置是正常的,
blog.bzbw.net location / {
                        rewrite ^/(post|record|sort|author|page)-([0-9]+)\.html$ /index.php?$1=$2;
                        rewrite ^/tag-(.+)\.html$ /index.php?tag=$1;
                }3 这是wordpress默认的一个配置   rewrite (.*) /index.php 是所有的指向到index.php吧?
location / {        if (-f $request_filename/index.html){
                rewrite (.*) $1/index.html break;
        }
        if (-f $request_filename/index.php){
                rewrite (.*) $1/index.php;
        }
        if (!-f $request_filename){
                rewrite (.*) /index.php;
        }}

解决方案 »

  1.   


     rewrite ^/([0-9]+)\.html$ /?p$1;请问这里的$1是指哪个变量啊??
      

  2.   

    Gooooooooooooooooooooooooooooooooooooooooooooooooooooooooooood
      

  3.   

    我试了一下你的正则,也试了平凡的世界那博客的正则,明显不行,是错的,从英文google里搜了下那些帖配出来的都没个行,看来仔细看一下nginx文档。
      

  4.   

    也可能是wp和nginx版本的原因。///
      

  5.   

    重写的正则是没有错.你wp后台永久链接设置的什么格式? 要是/?p##才能生效