C
c676228
Hi all,
A couple of months ago. I posted a thread and asked for help for redirect
all our site *.htm pages to *.asp pages because of our site upgrade almost
all *.htm to *.asp.
So some community members suggested use custom error page and redirect the
page to the same file but different ext. *.asp and it works fine in IE. But
when we tested in firefox today. it is not working. I wonder why? It is
because firefox return different format qstr? can you give me some clue. How
can I display the qstr in broswer in order to investigate it?
here is the code:
<% ' vbs
qstr = Request.ServerVariables("QUERY_STRING")
If instr(lcase(qstr),".htm")>0 then
on error resume next
x = replace(qstr, "404;http://www.mydomain.com:80","")
'404;http://www.mydomain.com:80
x = replace(x,".htm",".asp")
'server.transfer x
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", x
'Response.Redirect x
on error resume next
Response.Redirect "http://www.mydomain.com/404Page.htm"
on error goto 0
Else
on error resume next
Response.Redirect "http://www.mydomain.com/404Page.htm"
End if
%>
A couple of months ago. I posted a thread and asked for help for redirect
all our site *.htm pages to *.asp pages because of our site upgrade almost
all *.htm to *.asp.
So some community members suggested use custom error page and redirect the
page to the same file but different ext. *.asp and it works fine in IE. But
when we tested in firefox today. it is not working. I wonder why? It is
because firefox return different format qstr? can you give me some clue. How
can I display the qstr in broswer in order to investigate it?
here is the code:
<% ' vbs
qstr = Request.ServerVariables("QUERY_STRING")
If instr(lcase(qstr),".htm")>0 then
on error resume next
x = replace(qstr, "404;http://www.mydomain.com:80","")
'404;http://www.mydomain.com:80
x = replace(x,".htm",".asp")
'server.transfer x
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", x
'Response.Redirect x
on error resume next
Response.Redirect "http://www.mydomain.com/404Page.htm"
on error goto 0
Else
on error resume next
Response.Redirect "http://www.mydomain.com/404Page.htm"
End if
%>