ASP UrlRewrite ʹÓòο¼Îĵµ
ʲôÊÇUrlRewrite?
UrlRewrite ÊÇ ½«¾²Ì¬Ò³Ãæת»»Îª¶¯Ì¬Ò³ÃæµÄÒ»ÖÖ¼¼Êõ. ÀýÈç.ÄúÍøÕ¾Ò³ÃæÊÇ http://www.yourdomain.com/news/docread.aspx?id=123 ʹÓÃUrlRewriteת»»ºó ¿ÉÒÔ ÒÔ http://www.yourdomain.com/news/123.html À´·ÃÎÊ.
UrlRewriteµÄÓô¦: Âú×ãËÑË÷ÒýÇæµÄÒªÇó,Google¿ÉÒÔץȡ¶¯Ì¬Ò³Ã棬µ«ÊÇgoogle¶Ô¶¯Ì¬Ò³ÃæµÄÆÀ·ÖÒ»°ãµÍÓÚ¾²Ì¬Ò³Ãæ.
UrlRewrite ¶ÔIIS ·þÎñÆ÷ºÍApache·þÎñÆ÷Óв»Í¬µÄÉèÖÃ. Á½ÖÖÅäÖ÷½·¨²»Í¬. Çë¹ã´óÓû§Ç§Íò×¢Òâ.
Apache·þÎñÆ÷ÉèÖÃ: ÄúÐèÒªÔÚÍøÕ¾¸ùĿ¼´´½¨ .htAccess Îļþ.±àд¹æÔò.
IIS ·þÎñÆ÷ÉèÖÃ: ÄúÐèÒªÔÚÍøÕ¾¸ùĿ¼´´½¨ httpd.ini µÄÅäÖÃÎļþ, ±àд¹æÔò.
ÓÉÓÚ IISϵÄhttpd.iniºÍ ApacheµÄ.htaccess Îļþ ÊÇÁ½ÖÖÍêÈ«²»Í¬µÄÅäÖ÷½Ê½.Á½¸ö²»ÄÜ»¥»»Ê¹ÓÃ. ±àдURLReWrite ÐèҪרҵµÄ¼¼ÊõÈËÔ±.
ÈçºÎ¶ÔIIS·þÎñÆ÷µÄÍøÕ¾ ½øÐÐUrlRewriteµÄÉèÖã¿
×¢Òâ ʹÓÃURlRewrite ²»ÄÜ¿ªÆô ÍøÕ¾×Ô¶¨Òå 404´íÎó,·ñÔò UrlRewrite½«ÎÞ·¨Õý³£¹¤×÷
isapi_rewriteÀûÓÃÕýÔò±í´ïʽ½øÐÐÌæ»»¹æÔòµÄ±íʾ¡£
ÄúÐèÒªÔÚÄúÍøÕ¾¸ùĿ¼ ½¨Á¢Ò»¸ö httpd.ini µÄÅäÖÃÎļþ,ÀïÃæÓÐUrlRewriteÅäÖÃÐÅÏ¢.
ÒÔÏÂÊÇhttpd.ini µÄÄÚÈÝ
#----------------- httpd.ini ÎļþÄÚÈÝ,Äú¿ÉÒÔ¸´ÖƺóÉÏ´«µ½ÄúÍøÕ¾¸ùĿ¼-----------
[ISAPI_Rewrite]
# 3600 = 1 hour ÉèÖûº´æʱ¼ä 1¸öСʱ
CacheClockRate 3600
# ÉèÖÃÕýÔò±í´ïʽ Ìæ»»±äÁ¿¸öÊý.
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files from accessing through HTTP
# ÒÔÏÂUrlRewrite¹æÔòÊÇΪ±ÜÃâ ÍøÕ¾µÄ httpd.ini httpd.errors Ö®ÀàÅäÖÃÎļþ±»ÏÂÔØ.
RewriteRule ^/httpd(?:\.ini\.parse\.errors).* [F,I,O]
# ÕýʽURLRewrite¹æÔò ,Òâ˼ÊÇ http://server/123.html ¶¼½«·ÃÎÊ ¶¯Ì¬Ò³Ãæ http://server/urlrwtest.asp?id=123
# ÄúÐèÒª¸ù¾ÝÄúÍøÕ¾ÐèÒª½øÐиü¸Ä
RewriteRule /([0-9]*).html /urlrwtest.asp\?id=$1
#----------------- httpd.ini ÎļþÄÚÈݽáÊø-----------
urlrwtest.asp Îļþ ʾÀý:
<%response.write "URLRewrite ²âÊÔ:Äã·ÃÎʵÄIDºÅ ÊÇ:" & request("id")%>
Îļþ±£´æºó¼´¿ÉÉúЧ.
URLrewrite Ö§³Ö asp,asp.net,PHP µÈ¸÷Öֽű¾.
UrlRewrite ³£¼û´íÎó
1.ASP½Ì³Ì£ºUrlRewrite ʹÓòο¼Îĵµ(1)
2.ASP½Ì³Ì£ºUrlRewrite ʹÓòο¼Îĵµ(2)
http://www.xgdown.com/article/5/137659_1.htm
Ïà¹ØÎĵµ£º
ºÜ¼òµ¥µÄ½Ì³Ì£¬Ï׸øϲ»¶SEOµÄÅóÓÑÃÇ¡£°Ñhttp://www.***.cn/article.asp?logID=26 Ìæ»»³Éhttp://www.***.cn/article.asp?/a26.html¡£²»ÐèҪͨ¹ýiis+ISAPI_Rewrite×ö»ùÓÚIISµÄurl rewrite
Ò»¡¢Êý¾Ý¿âºÜ¼òµ¥Ê¹ÓÃACCESS£¬Data.mdb½¨Á¢Ò»¸ö±íArticle£¬Èý¸ö×ֶΣºID£¬Title£¬Content£»×Ô¶¯±àºÅ¡¢±êÌâ¡¢ÎÄÕÂÄÚÈÝ¡£
¶þ¡¢Config. ......
ÔÚ½« ASP.NET Web ²¿¼þµÄ¼¯³É¿Ø¼þ¼¯ÖеĿؼþ°üÀ¨ÔÚÍøÒ³ÖÐʱ£¬ÕâЩ¿Ø¼þ½«×ñÊظÃÒ³µÄ¹æÔò£»¾ßÌå¶øÑÔ¾ÍÊÇ£¬ÕâЩ¿Ø¼þ½«ÔÚ¸ÃÒ³µÄÉúÃüÖÜÆÚÄÚÔËÐС£
ÿ¸öÍøÒ³¶¼¾ßÓÐÒ»¸öÉúÃüÖÜÆÚ£¬ÍøÒ³ÔÚÆäÉúÃüÖÜÆÚÄÚ½«Ö´ÐÐһϵÁд¦Àí²½Öè¡£ÕâЩ²½Öè°üÀ¨³õʼ»¯¡¢´´½¨¿Ø¼þ¡¢»¹ÔºÍά»¤×´Ì¬¡¢ÔËÐÐʼþ´¦Àí³ÌÐò´ú ......
1.´íÎóÐÅÏ¢
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server ²»´æÔÚ»ò·ÃÎʱ»¾Ü¾ø
ÔÒò£º
2005ÀïËƺõ²»Ö§³Ö“(local)”ºÍ“µã”½«Æä¸ÄΪ·þÎñÆ÷µÄÃû³Æ¡£
2000ÊÇ¿ÉÒԵġ£ËùÒÔ²»»á³öÏÖÕâÑùµÄÎÊÌâ¡£
2.´íÎóÐÅÏ¢
´íÎóÀàÐÍÒ»£º
Mi ......
¡¡¡¡ÍøÉÏÁ÷´«µÄÖÖÖÖaspÉÏ´«ÀàÕæÊÇÌ«·³ËöÁË£¬ÎÒ×Ô¼ºÐ´ÁËÒ»¸öÉÏ´«Àà¡£Õâ¸öÉÏ´«ÀàÌå»ýºÜС£¬Ö»ÊÊÓÃÓÚµ¥ÎļþÉÏ´«£¬·µ»Ø½á¹ûÊÇÒ»¸öjson£¬¸ñʽΪ£º{"err":"³ö´íÔÒò","msg":"ÉÏ´«ÎļþµÄµØÖ·"}£¬ÀýÈ磺{"err":"\u6587\u4EF6\u592A\u5927\u4E86\2C\u4E0A\u4F20\u6587\u4EF6 ......