nginx regular matching problem
怪我咯
怪我咯 2017-05-16 17:29:13
0
1
607
location / {
    index   index.html index.htm index.php;
    rewrite ^/(.*)$ /index.php?/;
}

The regular part of the configuration file is as above, but files ending in .css and .jpg have also been rewritten. How can I block it?

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(1)
淡淡烟草味
  location / {
                   if (!-e $request_filename){   
                        rewrite ^(.*)$ /index.php?s=/ last; #rewrite模式   
                        rewrite ^(.*)$ /index.php/ last; #pathinfo模式 任选其一   
                    }   
              } 
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template