In IIS I specified a different file than the standard one for my 404 errors- that part works fine. I think this is where I am messing up... At the top of my 404 page, I tried to plus in a script (in pseduo) if RequestedURL = X then 301 redirct to Y end if Code (markup): The reason I am trying to do this is because somehow I got a very nice listing in DMOZ (which I already requested they change) that has anchor text for my main key phrase right there in the link... but they linked to mydomain.com/articles/ anchor-text-page There is a space between the path and the file name This means I can't just do a server based 301 redirect. There is no file to set it to redirect from because the space in the URL would mean I would have to start the file name to redirect from with a space, which windows automatically deletes... Any ideas? (aside from ISAPI filters) Is fixing the 404 page going to help?
Are you sure that dmoz has the link incorrectly and it's not only a glitch in the output? DMOZ should have a robot that checks for 404 errors on any linked pages and informs the editor.
I'm not sure, but either way the URL listed and the link have a space between the file name and the path. It's odd
Try this: CameFrom = lcase(Request.ServerVariables("HTTP_REFERER")) If instr("dmoz.org/health/alternative/alexander_technique/", CameFrom) then Response.Redirect "correct_page.asp" (not tested)
Hi TooHappy, Thanks for taking time to help me out with the code snip, but I think the script is not the problem. The problem is that the server already returned a 404 to the client, and for some reason my 404 page can't run scripts even though it has an ASP extension. I don't quite understand the problem fully, but I think the answer lies in IIS configuration somewhere.
It should be able to run the .asp extension which tells me that you are pointing to a file and not a url in the IIS config? Correct? Try this: Go into IIS Manager, find your website, right click, choose properties, custom errors, click on 404 and select URL (not file) and then give it the name of your error traping page, say trapit.asp so (/trapip.asp). And if that doesn't work, you can always give http://www.helicontech.com/download/#isapi_rewrite a shot. That will solve any problem Hope that helps!