Forum Moderators: open
URLS' look like this oldpage.asp?id=1
and new page looks like this
newpage.asp?id=1
I'd like to remove the old page and redirect all calls for those old pages to my new page with the same query string.
Can anyone tell me if this can be done easily and how or point me to a good source.
'set the initial page
u = "http://blah/blah.asp?"
'loop through each querystring
for each q in request.querystring
u = u & Server.URLEncode(q) & "=" & Server.URLEncode(request.querystring(q))
u = u & "&"
next
'remove the last &
u = left(u, len(u)-1)
response.redirect u
edit - Come to think of it, I'm not sure that the Server.URLEncode is nescessary, but couldnt hurt