Home  >  Article  >  Backend Development  >  小弟我把二级域名解释在IP下,当二级域名不让他访问主站的地址

小弟我把二级域名解释在IP下,当二级域名不让他访问主站的地址

WBOY
WBOYOriginal
2016-06-13 11:09:381131browse

我把二级域名解释在IP上,当二级域名不让他访问主站的地址

本帖最后由 liaohongchu 于 2012-11-21 16:42:50 编辑 比如主站 www.xinqq163.com/index.html

我做了二级域名 tm.xinqq163.com 也解释到IP上

这样的话 tm.xinqq163.com/index.html 也可以访问,这样对收录不好,怎么限制不让他访问呢

nginx伪静态的
location / {
            rewrite  ^(.*)/item/([0-9]+)\.html$  /plus/list.php?tid=$2&relationtid=$2 last;
        }

nginx服务器上可以限制吗 ?




------解决方案--------------------
你的不同域名用server{}分开啊
------解决方案--------------------
tm.xinqq163.com  为什么要指向同一个IP,  是两个网站吗?? 如果是, 不会访问到同样的内容, 如果不是, tm.xinqq163.com  直接 301 重定向 就可以了
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn