跳转到帖子
论坛QQ群

vBulletin 6.0 Nginx 伪静态 (LNMP一键包)

精选回复

发布于

vBulletin 6.0 Nginx 伪静态 (LNMP一键包)

更换为LNMP一键包,发现宝塔面板可用的伪静态,在LNMP一键包变成直接下载PHP文件

因此换为以下的伪静态

 

vi /usr/local/nginx/conf/rewrite/vbb.conf

 

rewrite ^/css.php$ /core/css.php last;
rewrite ^/install/ /core/install/ last;
rewrite ^/(admincp/)$ /index.php?routestring=$1 break;

if (!-f $request_filename) {
                        rewrite ^/(.*)$ /index.php?routestring=$1 break;
                }

try_files $uri $uri/ /index.php?routestring=$uri$is_args$args;

        location / {
                if (!-f $request_filename) {
                        rewrite ^/(.*)$ /index.php?routestring=$1 last;
                }
               if (!-e $request_filename){
               rewrite ^(.*)$ /index.php?routestring=$1 break;
                }
        }


保存并离开
:wq

 

重启nginx
/etc/init.d/nginx restart

 

 

LNMP-ng-rewrite.txt

创建帐户或登录后发表意见