匿名
未登录
登录
Linux78|wiki
搜索
查看“Nginx location robots.txt”的源代码
来自Linux78|wiki
名字空间
页面
讨论
更多
更多
页面选项
查看
查看源代码
历史
←
Nginx location robots.txt
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
wiki:用户|用户
您可以查看与复制此页面的源代码。
location =/robots.txt { root /data/wwwroot/xxx.com/; #单独rewrite一个文件要设置index等于这个文件 index robots.txt; } location =/robots.txt { default_type text/html; add_header Content-Type "text/plain; charset=UTF-8"; return 200 "User-Agent: *\nDisallow: /"; } location = /robots.txt { if ($http_user_agent !~* "spider|bot|yahoo|sogou") { return 404; } }
返回至
Nginx location robots.txt
。
导航
导航
首页
最近更改
随机页面
栏目
Nginx
Kubernetes
Spring Cloud
Wiki工具
Wiki工具
特殊页面
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志