Forum Moderators: open
Here's a typical URL setup:
www.example.com/store/brandpage.asp?brand=acme
www.example.com/store/prodpage.asp?product=widget
I set up artificial URLs like these:
www.example.com/myshop/acme/ (for brands)
www.example.com/myshop/acme/widget.htm (for products)
When someone clicks on a link, the page doesn't exist so it gets directed to the custom error page. I parse the error string, and set a few variables, and then use this code:
Response.Status = "200 OK"
server.execute("prodpage.asp")
Everything has worked flawlessly until recent server moves. Now, I get a different condition if the page called is a brand or product page.
"www.example.com/myshop/acme/" brings up the Acme product page just fine, the Server Status is 200, and the www.example.com/myshop/acme/ URL shows in the address bar. All is perfect.
But... "www.example.com/myshop/acme/widget.htm" brings up the correct page (so it's clear the error query string is being parsed correctly and the right variables are being passed), but checking the server headers shows this:
HTTP/1.1 302 Object moved
Server: Microsoft-IIS/5.0
Date: Fri, 26 Nov 2004 18:23:55 GMT
X-Powered-By: ASP.NET
Location: /store/customerror.htm?404;http://www.example.com/myshop/Acme/widget.htm
The URL that shows in the browser is:
[example.com...]
Through trial & error, I seem to have isolated it to the longer URL and/or the .htm "filename". I tried swapping the order of the code around, etc., to try to identify the problem; If I request the longer URL, it always produces the error. I'm guessing it's some kind of difference in the way the server processes the two errors, though I can't figure out why.
I'm also guessing that it might have to do with a server upgrade or service pack, although the affected sites moved which means some small setting might not have transferred properly.
Any thoughts from the IIS gurus here?
If .htm doesn't exist, then you can copy the settings from .asp and add it.
You should make sure that that checkbox is checked for all of the file extensions.
I actually sent you a picture of this setting in my email on 1/28/2003 when I worked on that project for you! :)