Forum Moderators: open
and I want to redirect to:
[somesite.com...]
Also, since the default.asp page without a query string is an acutal page, I need it so it doesn't redirect. I need to only redirect the pages with query strings.
Any help would be great!
Thanks!
The above *should* work when placed in ASP code before the HEAD in the HTML, although if you truly want a 301, you will have to also add 301 headers within the If-Then statements too. Not sure how that's done, but I'm sure someone here can help!
JD
<%
foo = cstr(request("foo"))
If len(foo) > 0 Then
url = "/some directory/" & foo & "/default.asp
Response.Status = “301 Moved Permanently”
Response.addheader "Location", "http://www.somedomain.com" & url
Response.End
End If
%>
Unfortuately, this code is for a client. I do not have an IIS ASP server to use to check the code. Does this appear right to anybody else for what I'm trying to do?
Thanks