阻止某些搜索引擎动态页面 [英] Block some of dynamic pages from search engines

查看:176
本文介绍了阻止某些搜索引擎动态页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要阻止某些从搜索我的网页我engines.How能做到这一点?
应用程序已通过使用ASP.net MVC和AngularJS开发。先谢谢了。

I need to block some of my pages from search engines.How can I do that ? App has been developed by using ASP.net MVC and AngularJS. Thanks in advance.

这些都是我想从搜索引擎阻止的URL。

These are the urls which I want to block from the search engines.

http://localhost:12534/myurl123-event?participant=12957

http://localhost:12534/myurl123-event

注意: URL的最后一部分是的动态(即 myurl123事件参与者= 12957 myurl123事件)。

Note : The last part of the url is dynamic (i.e. myurl123-event?participant=12957 and myurl123-event).

推荐答案

您可以使用robots.txt具有不允许设置:

You can use a robots.txt with a disallow setting:

User-agent: *
Disallow: /myurl123-event

如果你想阻止一切,那么你可以使用

If you want to block everything, then you can use

Disallow: /*

或者你可以把你的所有动态页面的路线内(或使用控制器的名字,如果你的路由是简单的控制器/方法/ ID)

or you can put all your dynamic pages inside a route (or use the controller name, if you're routing is straightforward controller/method/id)

Disallow: /dynamic/

这篇关于阻止某些搜索引擎动态页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆