ASP.NETµÄSEO£ºÊ¹ÓÃ.ashxÎļþ¡ª¡ªÅųýÖظ´ÄÚÈÝ
¶¯Ì¬ÍøÕ¾µÄÖظ´ÄÚÈݳ£³£ÊÇÓÉURL²ÎÊýÒýÆðµÄ£¬¶øURLÖØд»á¶ñ»¯ÕâÒ»ÏÖÏ󣨱ȽÏÄÍÈËѰζӴ£¬ºÇºÇ£©¡£ÒòΪÈç¹ûʹÓõÄÊÇÔʼµÄURL²ÎÊýµÄ»°£¬ËÑË÷ÒýÇæ¿É ÄÜ»á½øÐÐÊʵ±µÄÅжϣ¬¶øµÃÖªÖظ´ÄÚÈÝÊÇÓÉURL²ÎÊýÒýÆðµÄ£¬×Ô¶¯µÄ½øÐÐÏàÓ¦µÄ´¦Àí£»¶øURLÖØд»áÑÚ¸ÇURL²ÎÊý£¬·´¶øʹµÃËÑË÷ÒýÇæÎÞ·¨Ê¶±ðURL²ÎÊý¡£ ±ÈÈ磺
ÔʼµÄURL:
http://www.freeflying.com/articles.aspx?id=231&catelog=blog
http://www.freeflying.com/articles.aspx?id=231&catelog=news
¾¹ýURLÖØд¹ýºóµÄURL£º
http://www.freeflying.com/blog/231.html
http://www.freeflying.com/news/231.html
ÕâЩURLËùÖ¸ÏòµÄÒ³ÃæÄÚÈÝÆäʵÊÇÒ»ÑùµÄ£¬¶¼ÊÇid=231µÄÄÇƪÎÄÕ£¬µ«ÕâƪÎÄÕ±»blogºÍnewsÁ½¸öÀ¸Ä¿ËùÒýÓ㬳öÓÚ¸÷ÖÖÔÒòµÄ¿¼ÂÇ£¬ÎÒÃÇ×îÖÕµÄURL»¹ÊÇÈçÉÏËùʾ¡£
´¦ÀíµÄ°ì·¨ÓÐÁ½ÖÖ£¬Ò»ÖÖÊÇÀûÓûúÆ÷ÈË£¨robot£©ÐÒé¡°Åųý¡±ÆäÖÐÒ»¸ö£¬ÁíÒ»ÖÖÊÇͨ¹ý301½«ÆäÖÐÒ»¸öURLÓÀ¾ÃÖض¨ÏòÁíÒ»¸öURL¡£
½ñÌìÎÒÃÇÏȽ²robotÐÒé¡£¼òµ¥µÄ½²£¬robotÖ¸µÄ¾ÍÊÇËÑË÷ÒýÇ棬Õë¶ÔGoogle£¬ÎÒÃÇÓÖ½«Æä³Æ֮Ϊ¡°Ö©Ö루spider£©¡±¡£Ö©ÖëÊǺÜÓÐÀñòµÄ£¬ ÔÚץȡÄãµÄÍøÒ³ÄÚÈݵÄ֮ǰ£¬»áÊ×ÏÈÕ÷ÇóÄãµÄÒâ¼û¡£¶øÄãºÍrobot֮ǰ¾Í»ùÓÚrobotÐÒé½øÐйµÍ¨¡£¾ßÌ嵽ʵÏÖ£¬ÓÐÁ½ÖÖ·½Ê½£º
1. ½«Ò»¸öµÄrobots.txtÎı¾Ìí¼Óµ½ÍøÕ¾¸ùĿ¼Ï£¬È磺
#static content, forbid all the pages under the "Admin" folder
User-agent: *
Disallow: /Admin
#ÐбíʾעÊÍ£»
User-agentÖ¸ËÑË÷ÒýÇ棬*±íʾÕë¶ÔËùÓÐËÑË÷ÒýÇ棬Ҳ¿ÉÒÔÖ¸¶¨¾ßÌåµÄËÑË÷ÒýÇ棬ÈçUser-agent: googlebot£»
DisallowÖ¸¶¨²»ÔÊÐí·ÃÎʵÄĿ¼»òÒ³Ã棬עÒ⣺1. ´ËÎı¾ÊÇ´óСдÃô¸ÐµÄ£»2.±ØÐëÒÔ¡°\¡±¿ªÍ·£¬±íʾÍøÕ¾¸ùĿ¼£»
ºÍ±¾ÏµÁеÄ×ÚÖ¼Ò»Ñù£¬ÎÒÃÇ×ÅÖØ̸ASP.NET¼¼Êõ¡£ËùÒÔ¸ü¶àµÄrobots.txtÎı¾µÄ×¢ÒâÊÂÏÇë²é¿´http://www. googlechinawebmaster.com/2008/03/robotstxt.html
µ«ÎÒÃÇÔõô¶¯Ì¬µÄÉú³ÉÕâ¸öÎļþÄØ£¨ÕâÖÖÐèÇóÆäʵÂù¶àµÄ£©£¿¿ÉÄÜÎÒÃÇÂíÉÏÏëµ½µÄ¾ÍÊÇI/O²Ù×÷£¬ÔÚ¸ùĿ¼ÏÂдһ¸ötxtÎļþ¡¡£¬µ«Æäʵ»¹¿ÉÒÔÓÐÒ»ÖÖ·½·¨£ºÊ¹ÓÃÒ»°ã´¦Àí³ÌÐò£¨.ashxÎļþ£©£¬´úÂëÈçÏ£º
<%@ WebHandler Language="C#" Class="Handler" %> using System; using System.Web; public class Handler : IHttpHandler { public void ProcessRequest (HttpContext context) { HttpResponse response = context.Response; response.Clear(); //response.ContentType = "text/plain"; Èç¹ûÒªÓÃIE6²é¿´Ò³ÃæµÄ»°£¬²»ÄÜÕâÒ»ÌõÉùÃ÷£¬ÔÒò²»Ïê //ÏÂÃæÕâÁ½¾äÔÚʵ¼ÊʹÓÃÖÐÓ¦¸ÃÊý¾Ý¿âµÈ¶¯Ì¬Éú³É response.Write("User-agent: * \n"); response.Write("Disallow: /news/231.html \n"); //ÒýÓÃÒ»¸ö¾²Ì¬µÄrobotsÎļþÄÚÈÝ£¬ÀïÃæ´æ´¢²»»á¸Ä±äµÄÆÁ±ÎÄÚÈÝ response.WriteFile("~/static-robots.txt"); response.Flush(); } public bool IsReusable { get { return false; } } }Ò»°ã´¦Àí³ÌÐòʵÏÖÁËIHttpHandler£¬ÔÚÇ°ÃæUrlRewrite²¿·ÖÖУ¬ÎÒÃǽ²µ½ÁËHttpModule£¬ÆäʵÔÚASP.NETµÄÓ¦ÓóÌÐòÉúÃü ÖÜÆÚÖУ¬ÓÐÒ»¸ö³Æ֮Ϊ¡°¹ÜµÀ£¨pipeline£©¡±µÄ¸ÅÄһ¸öHTTPÇëÇ󣬾¹ýÒ»¸öÓÐÒ»¸öµÄHttpModuleµÄ¡°¹ýÂË/´¦Àí¡±£¬×îÖÕµ½´ïÒ»¸ö HttpHandleµÄ¡°´¦ÀíÆ÷¡±²¿·Ö£¬HttpModuleºÍHttpHandle¾Í×é³ÉÁËÒ»¸ö¡°¹ÜµÀ¡±.
Èç¹ûÄã¶ÔËü»¹±È½ÏÄ°ÉúµÄ»°£¬²é¿´PageµÄÔ´´úÂ룬Äã»á·¢ÏÖ£¬PageҲʵÏÖÁËIHttpHandler£¬ËùÒÔ*.aspxÎļþÊÇ×î³£ÓÃµÄ HttpHandle¡£µ«Page²»½ö½öÊÇÒ»¸öHttpHandler£¬Ëü»¹Ç¶ÈëÁ˸´ÔÓµÄÒ³ÃæÉúÃüÖÜÆÚʼþ£¬ËùÒÔ´Ó½ÚÔ¼×ÊÔ´µÄ½Ç¶È¿¼ÂÇ£¬ºÜ¶àʱºòÎÒÒ²¿ÉÒÔ Ê¹ÓÃ×Ô¶¨ÒåµÄ¡¢¸üÇáÁ¿¼¶µÄ*.ashxÎļþ£¨£©£¬À´Íê³ÉһЩ¼òµ¥µÄ¹¤×÷¡£ºÍÉú³ÉÒ»¸ötxtÎļþÀàËÆ£¬ÎÒÃÇ»¹¿ÉÒÔÉú³ÉÑéÖ¤Â루jpgÎļþ£©£¬xmlÎļþµÈ¡£
È»ºó»¹Òª×öµÄÒ»¼þʾÍÊǽøÐÐURLRewrite£º
void Application_BeginRequest(object sender, EventArgs e) { // Code that runs on application startup HttpContext context = HttpContext.Current; string currentLocation = context.Request.Url.LocalPath; if (currentLocation.ToLower() == "/website1/robots.txt") { context.RewritePath("~/Handler.ashx"); } }ÕâÑù£¬Ö©Öë¾Í»áÒÔΪÔÚÍøÕ¾µÄ¸ùĿ¼ÏµÄÈ·´æÔÚÒ»¸örobots.txtÎļþ¡£
2. ÔÚÐèÒªÆÁ±ÎµÄÒ³ÃæMETA±êÇ©Àï¼ÓÉÏ
noindex ÒâζןÃÒ³Ãæ²»Äܱ»Ë÷Òý nofollow ÒâζןÃÒ³Ãæ²»Äܱ»¡°¸úË桱£¨½«ÔÚSEO HackÖÐÏêϸ½²½â£© ÕâÊǾ²Ì¬Ò³ÃæµÄЧ¹û£¬Èç¹ûÐèÒª¶¯Ì¬Éú³É£¬Ò²Ï൱¼òµ¥£ºprotected void Page_Load(object sender, EventArgs e) { HtmlMeta meta = new HtmlMeta(); meta.Name = "robots"; meta.Content = "noindex,nofollow"; this.Header.Controls.Add(meta); }metaÖл¹¿ÉÒÔÖ¸¶¨description¡¢keywordµÈ£¬Æä¼¼ÊõʵÏÖÊÇÏàͬµÄ¡£
ÄÇô£¬Á½ÖÖ·½Ê½ÎÒÃÇÈçºÎÑ¡ÔñÄØ£¿ÎÒµÄһЩ½¨Ò飺
1.
¾¡Á¿Ê¹ÓÃrobots.txt£¬Õâ¼ÈÄܽµµÍÍøÕ¾µÄ¸ºÔØ£¨ËäÈ»ºÜС£¬ºÇºÇ£©£¬ÒòΪ֩Öë²é¿´ÁËrobots.txtÎļþÖ®ºó£¬¾Í²»»áÔÙÇëÇó±»ÆÁ±ÎµÄÏà¹ØÒ³Ãæ
ÁË£»¶øÈç¹ûʹÓÃmeta·½Ê½£¬Ö©Öë±ØÐëÏÈÇëÇó¸ÃÒ³Ã棬ÔÙ×ö³ö²»¼ìË÷µÄÅжϣ¬ÕâʱHttpÇëÇóÒѾ·¢³öÁË£¬·þÎñÆ÷¶ËµÄ×ÊÔ´¾ÍÒѾÀË·ÑÁË£»ÁíÍ⣬Èç¹û¹ý¶àµÄ
metaÆÁ±Î£¬Ò²»áʹ֩Öë¶ÔÍøÕ¾²úÉú²»¼ÑµÄÓ¡Ï󣬼õÉÙ»ò·ÅÆú¸ÃÍøÕ¾µÄ¼ìË÷ÊÕ¼£»
2. robots.txtÎı¾µÄÆ¥Åäʱ´Ó×óµ½Óҵģ¬ÕâÀï¾ÍûʲôÕýÔòÆ¥ÅäÁË£¡ËùÒÔÓеÄʱºò£¬ÎÒÃDz»µÃ²»Ê¹ÓÃmeta·½Ê½ÁË¡£ÈçÎÒÃÇÎÄÕ¿ªÊ¼µÄURL£º
http://www.freeflying.com/blog/231.html
http://www.freeflying.com/news/231.html
×îºó£¬ÔÙ½²Ò»Ð©×¢ÒâÊÂÏ
1.
²»ÒªÔÚËùÓÐÒ³ÃæʹÓÃÏàͬµÄKeywordºÍDiscription£¬ÕâÊÇÎÒÃǺÜÈÝÒ×·¸µÄÒ»¸ö´íÎó£¬ËäÈ»articles.aspxÊÇÒ»¸öÒ³Ã棬µ«¼ÓÉÏ
url²ÎÊýºó£¬¾Í±ä³ÉÁ˳ÉǧÉÏÍò¸öÒ³Ã棬Èç¹ûÄãÔÚÒ³ÃæÉÏдËÀÁËKeywordºÍDiscription£¬Äǽ«Ê¹Õâ³ÉǧÉÏÍò¸öÒ³Ã涼ÊÇÒ»ÑùµÄKeyword
ºÍDiscription£¡
2. ¾¡Á¿±ÜÃâʹÓûùÓÚURLµÄSessionID¡£ASP.NETÔÚ¿Í»§¶Ë½ûÓÃcookieµÄÇé¿öÏ£¬¿ÉÒÔÉèÖÃʹÓûùÓÚURLµÄSessionID£¬Ð§¹ûÀàËÆ£º
http://www.freeflying.com/(S(c3hvob55wirrndfd564))/articles.aspx
ÍƼöÐÅÏ¢
ÈÈÃÅÐÅÏ¢
- nohup: redirecting stderr to stdou....
- ʹÓÃlog_formatΪNginx·þÎñÆ÷ÉèÖøüÏêϸµÄÈÕÖ¾¸ñʽ
- jquery easyUI--dataGrid-Json
- [Ô´´]·ÂGoogle Reader¡¢ÐÂÀË΢²©¡¢ÌÚѶ΢²©µ....
- ÀûÓÃKeepalived+mysql¹¹½¨¸ß¿ÉÓÃMySQLË«Ö÷×Ô¶....
- Nginx+keepalivedʵÏÖ¸ºÔؾùºâºÍË«»úÈȱ¸¸ß¿ÉÓÃ
- jqueryʵÏÖÒ³Ãæ¼ÓÔؽø¶ÈÌõ
- Rolling cURL: PHP²¢·¢×î¼Ñʵ¼ù
- codeigniter ·ÓÉÖÕ¼«ÓÅ»¯(url rewrite)
- linuxÏÂÉèÖÃsshÎÞÃÜÂëµÇ¼
×î½ü¸üÐÂ
- Asp.net MVCÔ´Âë·ÖÎö--Model Validation(Se....
- .Net À¬»ø»ØÊÕ»úÖÆÔÀíºÍËã·¨£¨Ò»£©
- .netʵÌåнâ
- ·ÖÎöASP.NET¶ÁÈ¡XMLÎļþ4ÖÖ·½·¨
- »ñÈ¡ÍøÕ¾ËõÂÔͼ´úÂë
- Asp.net ¸ù¾ÝIPµØÖ·»ñÈ¡¿çÍø¶ÎmacµØÖ·º¯Êý¡¾ËѲء¿
- ¹ýÂËÃô¸Ð¹Ø¼ü×Ö¡£
- Éú³ÉÖ¸¶¨Î»ÊýµÄËæ»ú×Ö·û´®
- ¿Í»§¶Ë»ñÈ¡MACµØÖ·£¬µ½·þÎñÆ÷ÑéÖ¤
- ²½²½ÎªÓª .NETÈý²ã¼Ü¹¹½âÎö ¶þ¡¢Êý¾Ý¿âÉè¼Æ
ÆÀÂÛ