It gives an example of the code your likely to use below:
If InStr(LCase(Request.ServerVariables(“SERVER_NAME”)),“www”) = 0 Then
Response.Status=“301 Moved Permanently”
Response.AddHeader “Location”, “http://www.domain.com”
End If
But imagine you have found a page you want to direct. Do you then knock out all the HTML code etc and insert the snippet above. Or do you place it in the <head> tags with all the other code intact.
I’m not sure. I posted this question for pre job interview preparation. I have very limited server side experience. The role is for an SEO technician and whilst I’m 99% confident i tick all the boxes I’ve had no direct experience of doing 301 re directs which is a skill you should be able to call on.
If I dont get back to you thanks for trying to help me out
First, that is for “classic” ASP, not ASP.NET. Though I suspect that the syntax would work if you are using VB.
Anyhow, a better way to handle this would be using something on the server, not in your application. Are you running on Windows Server 2008 (IIS7) or 2003 (IIS6)?