Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So, I have a site with 2 host headers:

header1.somewhere.com
header2.somewhere.com

In this site, I have a virtual directory called Foo and it has various sub-directories 1, 2, 3 & 4 that have various style sheets. A page references these style sheets dynamically via /Foo/1/Style.css and /Foo/2/Style.css.

i.e.

http://header1.somewhere.com/SomePageThatUsesFoo1Style.aspx
http://header1.somewhere.com/SomePageThatUsesFoo2Style.aspx

When I go to http://header1.somewhere.com/SomePageThatUsesFoo2Style.aspx I am getting a 404 trying to get /Foo/2/Style.css.

The file absolutely 100% exists in the correct directory, and permissions are correct.

The interesting part. If I go to http://header1.somewhere.com/SomePageThatUsesFoo1Style.aspx it works just fine. Also, if I go to http://header2.SomePageThatUsesFoo2Style.aspx or http://header2.somewhere.com/SomePageThatUsesFoo1Style.aspx it works just fine.

Has anyone seen this kind of weird issue where 1 specific host header screws things up?

I'll also add that just for giggles, I created a completely NEW website from scratch with a NEW host header (header3.somewhere.com) and everything worked. I stopped the old site, and added header1 and header2 to the new site and the same error occurs.

Any thoughts?

EDIT: I tried using Microsoft Network Monitor 3.4 to capture packets. I hit several pages of my site where the above is experienced. Applied a filter to the capture for any HTTP status code >= 400 and there are no results. When using Fiddler from my desktop hitting my site, Fiddler shows a 404 also.

share|improve this question
1  
I've had the best luck tracking down 404 errors by running a packet capture on the server to watch the actual requests and responses. This has helped me track down weird 404 problems. –  joeqwerty Aug 9 '11 at 23:11
    
Can you recommend one? –  Adam Aug 10 '11 at 13:50
1  
Microsoft Network Monitor is a good one, and it's free. microsoft.com/download/en/… –  joeqwerty Aug 10 '11 at 14:05
    
I downloaded and installed this, captured traffic for a bit, hit my site experiencing the above, and ran the standard httperror filter built in and have no results. Thoughts? –  Adam Aug 10 '11 at 14:26
1  
In the capture you should be able to see the actual request that generetaed the 404 and the response. I usually key in on the request to see what exactly is being requested. You should be able to see the actual URL being requested when the 404 is encountered and you can then verify whether the URL is valid or not. Feel free to post a screenshot of the request/response when the 404 is encountered. –  joeqwerty Aug 10 '11 at 14:47

1 Answer 1

up vote 1 down vote accepted

I've had the best luck tracking down 404 errors by running a packet capture on the server to watch the actual requests and responses.

In the capture you should be able to see the actual request that generated the 404 and the response. I usually key in on the request to see what exactly is being requested. You should be able to see the actual URL being requested when the 404 is encountered and you can then verify whether the URL is valid or not.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.