Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
error 404 - treated different for missing .asp page compared to missing .html
Old 03-21-2007, 11:47 AM error 404 - treated different for missing .asp page compared to missing .html
Junior Talker

Posts: 2
Name: giancarlo
Trades: 0
Hi everyone.

I have this problem that I am experiencing when I move a certain site from one hosting to another hosting location. This is why I think this problem is not related to ASP code, rather than to IIS settings which are different in one hosting company to another.

I am talking about a site I have that has no pages on it, rather it catches 404 http errors and according to the filename of the missing page, it returns content to browser. Now, on some hosting companies, I see for requested missing .asp pages ONLY (i.e: for missing .html files it works great on all hosting locations) that in the address bar of the browser I see something like:

http://www.site.com/404.asp?404;http://www.site.com/sample.asp

when I request the page - http://www.site.com/sample.asp

When I move this site to another hosting company, maybe due to different IIS settings, I see in the address bar this address:

http://www.site.com/sample.asp

which is how it should be.

My question is this: How do I set IIS or change ASP code so that on the hosting locations where the address bar is showing the URL as http://www.site.com/404.asp?404;http://www.site.com/sample.asp for missing http://www.site.com/sample.asp page, I will simply see http://www.site.com/sample.asp as if the page exists on site ??

NOTE that with missing .html pages all is working well on all hosting location/IIS servers.

Thanks for the help!
Sami
giansel30 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-21-2007, 11:56 AM Re: error 404 - treated different for missing .asp page compared to missing .html
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Sounds like your first host has put in a custom 404 error page to trap the errors...or you did.

Remove the custom 404 off of the first host and you'll be fine.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 03-21-2007, 12:18 PM Re: error 404 - treated different for missing .asp page compared to missing .html
Junior Talker

Posts: 2
Name: giancarlo
Trades: 0
Hi Adam web design,

Thanks a lot for your quick and concise reply. I went through it and removed the /404.asp entry as the 404 error handling script from the host that shows in the address bar something like this - http://www.site.com/404.asp?404;http://www.site.com/sample.asp but then the whole site was not functioning and I got error 404 for all missing pages. Do you know what can be done?

Thanks a lot!
giansel30 is offline
Reply With Quote
View Public Profile
 
Old 03-21-2007, 12:41 PM Re: error 404 - treated different for missing .asp page compared to missing .html
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Okay, so you do have a custom 404 page...which is probably what you wanted. You will get the 404 error with it removed because...well...the pages are missing, and that's the result you're supposed to get. That's normal, expected, and correct behaviour.

I've seen the same behaviour with a custom 404, and never did find the answer to it. In the end, I just chose to ignore it...it really doesn't have an impact on anything.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 03-22-2007, 06:12 AM Re: error 404 - treated different for missing .asp page compared to missing .html
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
it will depend on if the custom 404 type is set to URL or file

to use a scripted 404 page it should be set to URL, note that using a scripted page the response returned to user agents will be a 200 NOT a 404, make sure your script returns the correct response appropriately to UAs
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to error 404 - treated different for missing .asp page compared to missing .html
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.14889 seconds with 12 queries