Nginx環境
在Nginx低版本中,是不支持PATHINFO的,可是能夠經過在Nginx.conf中配置轉發規則實現:在nginx配置文件中添加
php
location / {
nginx
if (!-e $request_filename) {
服務器
rewrite ^(.*)$ /index.php?s=$1 last;
dom
break;
spa
}
it
}io
location /youdomain/ {
ast
if (!-e $request_filename){
配置
rewrite ^/youdomain/(.*)$ /youdomain/index.php?s=$1 last;
file
}
}