|
如题,比如我想访问控制器index.php中的test方法 ,我需要 http://localhost/index.php?/index/test或者http://localhost/?/index/test 这样才可以,但不想idnex.php?或者?这些 就直接/index/test 这样访问 该怎么改
我nginx.conf配置是这样的server {
listen 80;
server_name shop.com;
root c:/work/shop;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php;
}
location ~*\.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
} |
|