Jack Posted January 10, 2020 Share Posted January 10, 2020 (edited) ------------------------------- 先删除旧的修改方法 ------------------------------- 如果你之前设置了伪静态,你需要先删除 宝塔面板 -> 点击 你的网址.com -> 配置文件 -> 删除以下这几行的伪静态 #禁止访问的文件或目录 伪静态在这一行的上面 # Set up rewrite rules. location /论坛目录名 { try_files $uri $uri/ /论坛目录名/index.php; } location ~^(/page/).*(.php)$ { try_files $uri $uri/ /论坛目录名/index.php; } --------------------------------------- 新的修改方法,使用到 api 文件夹 --------------------------------------- 如果你的服务器使用Apache,IPS论坛将自动给你伪静态 htaccess 文件,只要上传并修改 .htaccess 这个文件就可以。接下来到IPS论坛后台设置伪静态 如果你使用Nginx,你需要依照以下的方法,才能使用Nginx伪静态 例如:论坛安装在 https://网址.com/forum/ 宝塔面板 -> 点击 你的论坛.com -> 伪静态 -> 0.当前 将以下的伪静态,复制并黏贴 -> 保存 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; } } ------------------------------------ IPS论坛后台,也需要设置伪静态 ------------------------------------ 到IPS论坛后台设置伪静态 在这行的下面 IPS论坛后台,也需要设置伪静态 Edited July 20, 2021 by Jack Link to comment Share on other sites More sharing options...
Jack Posted July 7, 2021 Author Share Posted July 7, 2021 更新 新的修改方法,使用到 api 文件夹 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now