Jump to content
PHP論壇人

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


Recommended Posts

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

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...