linux nginx 怎么禁止一些搜索引擎

linux nginx 怎么禁止一些搜索引擎,第1张

server {

listen 80

server_name www.xxx.com

#charset koi8-r

#access_log logs/host.access.log main

#location / {

#root html

#index index.html index.htm

#}

if ($http_user_agent ~* "qihoobot|Baiduspider|Googlebot|Googlebot-Mobile|Googlebot-Image|Mediapartners-Google|Adsbot-Google|Feedfetcher-Google|Yahoo! Slurp|Yahoo! Slurp China|YoudaoBot|Sosospider|Sogou spider|Sogou web spider|MSNBot|ia_archiver|Tomato Bot") {

return 403

}

location ~ ^/(.*)$ {

proxy_pass http://localhost:8080

proxy_redirect off

proxy_set_headerHost $host

proxy_set_headerX-Real-IP $remote_addr

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for

client_max_body_size10m

client_body_buffer_size 128k

proxy_connect_timeout 90

proxy_send_timeout 90

proxy_read_timeout 90

proxy_buffer_size 4k

proxy_buffers 4 32k

proxy_busy_buffers_size 64k

proxy_temp_file_write_size 64k

}

#error_page 404 /404.html

# redirect server error pages to the static page /50x.html

#

error_page 500 502 503 504 /50x.html

location = /50x.html {

root html

}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80

#

#location ~ \.php$ {

#proxy_pass http://127.0.0.1

#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

#

#location ~ \.php$ {

#root html

#fastcgi_pass 127.0.0.1:9000

#fastcgi_index index.php

#fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name

#includefastcgi_params

#}

# deny access to .htaccess files, if Apache's document root

# concurs with nginx's one

#

#location ~ /\.ht {

#deny all

#}

}

第一种:自定义删除(即想删除哪条历史记录就删除哪条)

在百度搜索网页里的搜索栏中,点击鼠标左键两次,会出现以前搜索过的历史记录。然后用鼠标指向你想要删除的历史记录(注意:是指向,不要点击),这时这条历史记录会深色显示,再点击DEL键,就可以删除这一条历史记录了。这种方法你可以随心所欲,想删哪条都可以。

第二种:完全删除法

在桌面用鼠标右键点击IE图标,再点属性。选上面的“内容”按钮。再点下面的“自动完成”按钮。然后点击“清除表单”,就可以把以前的所有历史记录删掉。如果想以后也把录用的内容不留历史记录,则把“表单”前面的勾去掉。

第三种:打开IE网页,选择"工具"中的"Internet选项",在"常规"右下方有"删除历史记录"点击并应用就可以

网站想要取消限制搜索引擎抓取可以直接在网站后台进行设置,通过上传robots文件或者在服务器上面利用网站安全狗软件设置静止抓取等方式。直接在网站后台进行设置时,可以登录wordpress网站后台,点击设置按钮和阅读按钮,然后找到建议搜索引擎不索引本站点前面的框框,然后勾选这个框框,然后点击保存更改即可;如果通过上传robots文件的方式,可以先在本地创建一个robots文件,然后在robots文件里面写入静止搜索引擎抓取的代码,写入完成后,然后通过FTP文件上传工具将robots.txt文件上传到网站的根目录中;如果利用服务器中的网站安全狗设置静止搜索引擎抓取,可以登录Windows系统的服务器,打开里面的网站安全狗软件,然后找到IP黑白名单,然后将开启爬虫访问白名单签名的勾去掉,然后点击保存即可。\r\n


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/8473636.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-16
下一篇 2023-04-16

发表评论

登录后才能评论

评论列表(0条)

保存