![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
大象站群
seoshen
这个作者很懒,什么都没留下…
展开
-
nginx设置只允许蜘蛛访问其他访问为404或者301跳转
nginx设置只允许蜘蛛访问其他访问为404或者301跳转ngxinx设置只允许百度360蜘蛛访问,其他任何IP或者蜘蛛访问为404状态if ($http_user_agent !~* "Baidu|Yisou|Sogou|Google|360"){return 404;}实测浏览器打开为404状态,网站日志百度蜘蛛为200正常状态。设置只允许百度360蜘蛛访问,访客浏览器跳转 if ($http_user_agent !~* "Baidu|Yisou|Sogou|Google|360")原创 2021-02-22 18:55:07 · 1952 阅读 · 0 评论 -
大象站群404版伪静态规则
以宝塔面板为例,找到网站配置里面的文件#ERROR-PAGE-START 错误页配置,可以注释、删除或修改error_page 404 /404.html;error_page 502 /502.html;#ERROR-PAGE-END修改上面的代码,意思就是让404文件变成正常内容出现。#ERROR-PAGE-START 错误页配置,可以注释、删除或修改error_page 404 =200 /404.php;error_page 502 /502.html;#ERROR-PA原创 2020-12-18 13:53:15 · 352 阅读 · 0 评论 -
大象站群缓存版伪静态规则
大象站群缓存版伪静态规则location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php?s?rewrite=$1 last; }}二级目录伪静态规则,以news目录为例location /news { if (!-e $request_filename){ rewrite ^/news/(.*)$ /news/index.php?s?rewrite=$1 last; }}...原创 2020-12-18 13:40:47 · 239 阅读 · 0 评论