vhost配置
include thinkphp.conf;
include enable-php-pathinfo.conf;
thinkphp.conf
location / {
if (!-e $request_filename) {
#rewrite ^(.*)$ /index.php?s=/$1 last;
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
本文详细介绍了 VHost 的配置方法, 包括 thinkphp 和 enable-php-pathinfo 的配置细节, 通过重写规则实现 URL 的友好显示, 并确保请求能够正确地路由到 PHP 应用中。
vhost配置
include thinkphp.conf;
include enable-php-pathinfo.conf;
thinkphp.conf
location / {
if (!-e $request_filename) {
#rewrite ^(.*)$ /index.php?s=/$1 last;
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}

被折叠的 条评论
为什么被折叠?