ÈçºÎÔÚaspÖÐÉèÖÃ302ºÍ301Ìøת
³£ÓõÄÖض¨Ïò·½Ê½ÓÐ: 301 redirect, 302 redirect Óë meta fresh£º
ASP ÖУ¬ÎÒÃÇÏ°¹ßʹÓà Response.Redirdect À´ÊµÏÖÒ³ÃæµÄÌøת£¬µ«ÊÇÕâÖÖÌøת·½Ê½µÄ״̬ÊÇ 302 µÄ£¬ÊôÓÚÁÙʱÌøת£¬¶ÔÓÚËÑË÷ÒýÇæÀ´Ëµ£¬ÊÇÒ»ÖÖ²»ÓѺõÄÖض¨Ïò·½Ê½¡£
ASP 3.0 ÖУ¬ÓÐÁËÁíÒ»ÖÖ·½Ê½£¬¼´ Response.Transfer ¡£¹ØÓÚÕâ¸ö£¬¿ÉÒÔ²éѯÏà¹ØµÄÐÅÏ¢¡£
ÎÒÃÇÕâÀïÒªÌÖÂÛµÄÊÇ 301 Ìøת£¬ÀýÈçÏÂÃæµÄ´úÂ룺
<%@ Language="VBScript" %>
<%
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", http://www.gzse7en.com
%>
ÕâÖÖ·½Ê½£¬¶ÔÓÚËÑË÷ÒýÇæÀ´Ëµ£¬ÊÇÓÀ¾ÃÐԵģ¬ÌøתºóµÄÒ³ÃæµÄÄÚÈÝ¿ÉÒÔ±»²ÉÓá£ÓÉ´Ë£¬Ï뵽һЩÈËÎʵ½µÄ£¬ÈçºÎʵÏÖͬһ¸ö¿Õ¼ä°ó¶¨¶à¸öÓòÃû¡£Æäʵ£¬Ö»ÒªÕë¶ÔÊäÈëµÄÓòÃû½øÐÐʶ±ð£¬È»ºó½áºÏ 301 ÌøתÀ´Ñ¡ÔñÄ¿±ê¾ÍÄܺܺÃʵÏÖ¡£¼ÙÉèÓÐÓòÃû www.seo-8.com ºÍ http://www.gzse7en.com£¬·Ö±ðÕë¶Ôͬһ¸ö¿Õ¼äÖÐµÄ div_css ºÍ div_css Á½¸öĿ¼£¬ÄÇôÔõôͨ¹ýÁ½¸öÓòÃûÀ´×Ô¶¯È·¶¨·ÃÎÊÄĸöĿ¼ÄØ£¿Çë¿´ÏÂÃæµÄ´úÂ룺
<%
Dim strHost = LCase(Request.ServerVariables("HTTP_HOST"))
Response.Status = "301 Moved Permanently"
Select Case strHost
Case "www.seo-8.com"
Response.AddHeader "Location",
"http://www.gzse7en.com/div_css"
Case "www.div-css.net"
Response.AddHeader "Location",
"http://www.gzse7en.com/div_css"
Case Else
Response.AddHeader "Location",
"http://www.gzse7en.com/div_css"
End Select
%>
Ïà¹ØÎĵµ£º
¡¡¡¡1. Ö»·µ»Øµ¥Ò»¼Ç¼¼¯µÄ´æ´¢¹ý³Ì
¡¡¡¡¼ÙÉèÓÐÒÔÏ´洢¹ý³Ì(±¾ÎĵÄÄ¿µÄ²»ÔÚÓÚ½²ÊöT-SQLÓï·¨£¬ËùÒÔ´æ´¢¹ý³ÌÖ»¸ø³ö´úÂ룬²»×÷˵Ã÷)£º
/*SP1*/
CREATE PROCEDURE dbo.getUserList
as
set nocount on
begin
select * from dbo.[userinfo]
end
go
¡¡¡¡ÒÔÉÏ´æ´¢¹ý³ÌÈ¡µÃuserinfo±íÖеÄËùÓмǼ£¬·µ»ØÒ»¸ö¼Ç¼¼¯¡£Í¨¹ ......
¡¡¡¡7. ·µ»Ø¶à¸ö¼Ç¼¼¯µÄ´æ´¢¹ý³Ì
¡¡¡¡±¾ÎÄ×îÏȽéÉܵÄÊÇ·µ»Ø¼Ç¼¼¯µÄ´æ´¢¹ý³Ì¡£ÓÐʱºò£¬ÐèÒªÒ»¸ö´æ´¢¹ý³Ì·µ»Ø¶à¸ö¼Ç¼¼¯£¬ÔÚASPÖУ¬ÈçºÎͬʱȡµÃÕâЩ¼Ç¼¼¯ÄØ£¿ÎªÁË˵Ã÷ÕâÒ»ÎÊÌ⣬ÔÚuserinfo±íÖÐÔö¼ÓÁ½¸ö×ֶΣºusertel¼°usermail£¬²¢É趨ֻÓеǼÓû§¿ÉÒԲ鿴ÕâÁ½ÏîÄÚÈÝ¡£
/*SP7*/
CREATE PROCEDURE dbo.getUserInfo
......
dim dtNow
dtNow = date()
dim newDate
newDate = year(dtNow) & "-" & right("0" & month(dtNow),2) & "-" & right("0" & day(dtNow),2)
Õâ¸ö×Ô¶¯½«2010-4-20 ת»¯Îª 2010-04-20
http://w.sogou.com/question/99319695.html ......
ÔÚ±àдASP³ÌÐòµÄʱºò£¬Í¨³£¶¼»áÓõ½<!--#include virtual/file="path/filename"-->°ÑÒ»¶ÎÏà¶Ô¶ÀÁ¢µÄÎļþ´úÂëǶÌ×µ½µ±Ç°Ò³ÃæÖÐÀ´¡£
¡¡¡¡Ê¹ÓÃ"file"µÄʱºò£¬µÈºÅºóÃæʹÓõÄÊÇÏà¶Ô·¾¶¡£Ê¹ÓÃ"virtual"µÄʱºò£¬µÈºÅºóÃæʹÓõÄÊǾø¶Ô·¾¶¡£ºÜ¶àÈ˶¼²»ÖªµÀvirtualÕâ¸ö°üº¬¾ø¶Ô·¾¶¡£ ......