Jump to content
PHP論壇人

12.IPS论坛的Nginx伪静态


Recommended Posts

------------------------------
IPS论坛的Nginx伪静态
------------------------------

前面安装步骤,伪静态那里我输入ips
所以在此修改 ips文件的伪静态内容
vi /usr/local/nginx/conf/rewrite/ips.conf


这个伪静态规则内容是你IPS论坛安装在域名根目录,就可以将以下内容复制并粘贴

如果你论坛装在子目录则不能使用

location / {
        try_files  $uri $uri/ /index.php;
  }
location ~^(/page/).*(.php)$ {
    try_files  $uri $uri/ /index.php;
}

location /api/ {
  if (!-e $request_filename){
    rewrite ^/api/(.*)$ /api/index.php;
  }
}

 


保存并离开
:wq

 

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

 


如果你准备安装新的IPS论坛,由于伪静态还没有设置好,你之后进入IPS论坛后台要赶紧设置论坛的伪静态

IPS论坛Nginx伪静态 [简体]

IPS论坛Nginx伪静态 for 其他目录 [简体]

注意:从这一行开始,在论坛后台设置伪静态
------------------------------------
IPS论坛后台,也需要设置伪静态
------------------------------------

 

同上,如果你已有IPS论坛,之后搬迁过来LNMP,也要赶紧在论坛后台查看伪静态有无设置正确

Edited by Jack
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...