![]() |
#2
yms1232010-05-30 18:24
|

<%
if request.ServerVariables("HTTP_HOST")="" then
if Request.ServerVariables("QUERY_STRING")<>"" then p="?"
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www."&Request.ServerVariables("SCRIPT_NAME")&p&Request.ServerVariables("QUERY_STRING")
Response.End
end if
%>
用上面的代码,把不带www的域名,跳转到带www的域名,但是伪静态的网址就不能用了,比如:伪静态网址/newsclass-1.html,跳转后就是/newsclass.asp?page=1if request.ServerVariables("HTTP_HOST")="" then
if Request.ServerVariables("QUERY_STRING")<>"" then p="?"
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://www."&Request.ServerVariables("SCRIPT_NAME")&p&Request.ServerVariables("QUERY_STRING")
Response.End
end if
%>
请教高手,怎么实现在跳转后,还是伪静态。