1、用记事本 填写以下代码文件,重命名为 web.config- <?xml version="1.0" encoding="UTF-8"?>
- <configuration>
- <system.webServer>
- <handlers accessPolicy="Read" />
- </system.webServer>
- </configuration>
复制代码 2、到宝塔后台,修改为以下伪静态为
- location / {
- if (!-e $request_filename) {
- rewrite vip(.*) /shop/view.php?str=$1 last;
- rewrite ^/(.*)/search(.*).html /$1/index.php?str=$2 last;
- rewrite ^/(.*)/view([0-9]*).html /$1/view.php?id=$2 last;
- rewrite ^/(.*)/(.*)list(.*).html /$1/$2list.php?str=$3 last;
- rewrite ^/(.*)/(.*)view(.*).html /$1/$2view.php?id=$3 last;
- }
- location ~* ^/((.*)upload|ad|gg|gg1|img|homeimg|js|css|ckeditor\/attached|(.*)upload1|(.*)upload2|(.*)upload3)/.*\.(php|php5|asp)$
- {
- deny all;
- }
- }
-
- location ~* ^/((.*)upload|ad|gg|img|ckeditor\/attached|(.*)upload1|(.*)upload2|(.*)upload3)/.*\.(php|php5|asp)$
- {
- deny all;
- }
- if ($host = 'yilenet.cn' ) {
- rewrite ^/(.*)$ https://www.yilenet.cn/$1 permanent;
- }
复制代码
最后用 Ctrl+F5 强制刷新,后台清除缓存 就搞定了!!!(最后这一个只需要修改提示的文件夹名称)
|