Forum Moderators: open
If URL Contains /ProductDetails.asp
Then
Redirect
End If
I used the code below but it doesn't work perfectly:
<%
If Request.ServerVariables("url") = "/ProductDetails.asp" Then
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "redirectURL"
End If
%>
The above code seems to check with the server what URL is being called. However, I'm rewriting URLs to make them SEO friendly and the code above won't let me redirect correctly.
So... my question is... is there a way using ASP that I can check the URL for a string not using the ServerVariables command?
Other than that, the only way I can think of would be to append "?url="(insert the entire url)"" to the end of the url and then use Request.QueryString("url") to grab it.