更换域名自动跳转的404代码。大家参考吧
- 为自己的个人空间设计个性模板
为自己的个人空间设计个性模板 伴随着越来越多的Blog出... - 婚恋交友网站缺乏盈利能力 可...
据了解,目前在国外,人气火暴异常的著名社交网站MySpac... - 国内外cms网站大全
国内外cms网站大全 转载请厚道,注明出自落伍: http://www.i... - 最新2006年度中国国内主流CM...
CMS(Content Management System),译为网站内容...
原问:
假设以前有个域名为:http://www.abc.com/
现在要更换一个新的:http://www.123.com/
怎样才能让http://www.abc.com/自动跳转到http://www.123.com/
我说的跳转是在http://www.abc.com/带有参数的时候,比如
http://www.abc.com/01/1.html 自动跳转到 http://www.123.com/01/1.html
如果定义一个404错误,这个代码怎么写。
感谢 etangren
404.asp 你就这样写
CODE:[Copy to clipboard]<%
dim url
Private Function GetUrl()
Dim ScriptAddress, M_ItemUrl, M_item
ScriptAddress = CStr(Request.ServerVariables("SCRIPT_NAME")) '取得当前地址
M_ItemUrl = ""
If (Request.QueryString <> "") Then
ScriptAddress = ScriptAddress & "?"
For Each M_item In Request.QueryString
If InStr(page,M_Item)=0 Then
M_ItemUrl = M_ItemUrl & M_Item &"="& Server.URLEncode(Request.QueryString(""&M_Item&"")) &
"&"
End If
Next
end if
GetUrl = ScriptAddress & M_ItemUrl
End Function
%>
<%Response.Redirect "http://www.abc.com/"&Url&""%> 跳转的域名




