項目配置文件config.php
return array(
"URL_MODEL"=>2, //關(guān)于URL更多說明請參考Tinkphp/Common/convention.php
);
復(fù)制代碼
配置Nginx.conf
在你的虛擬主機下添加
location / {
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php/$1 last;
}
}
如果你的項目入口文件在一個子目錄內(nèi)則
location /目錄/ {
if (!-e $request_filename){
rewrite ^/目錄/(.*)$ /目錄/index.php/$1 last;
}
}
發(fā)表評論