Well, I am changing some things around on my site and the forum directory is going from siteurl/snofan to siteurl/forum. The thing is that there are a lot of posted links in the forum that refer to the old location. I am trying to think of a way so when people click the existing links to references of posts they dont get a dead link. So far I has set up a custom 404.asp page and have this code.
strBadLink = Request.QueryString
strBadLink = Replace(strBadLink, "404;", "")
strFolderFile = right(strBadLink, (len(strBadLink)-33))
strFile = right(strBadLink, (len(strBadLink)-40))
strOld = "snofan/" + strFile
if strFolderFile = strOld then
Response.Redirect "http://sf.snowmobilefanatics.com/forum/" & strFile
end if
I am getting the requested url, taking of the junk, finding the folder/file.asp combination then just finding the file. I am then comparing the old url to what the user typed in and if the two match it will forrward the user to the new url. If not it will just display the normal 404.asp error page I have set up. Problem is when I go to a link such as: http://www.snowmobilefanatics.com/snofan/topic.asp?TOPIC_ID=7533 where I have a TOPIC_ID=7533 that part is not included so it goes to topic.asp which forwards them to default.asp Anyone have any idea how I can grab the TOPIC_ID as well? I am a little stumped here. Thanks!