So, I have a site with 2 host headers:
header1.example.com
header2.example.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.example.com/SomePageThatUsesFoo1Style.aspx
http://header1.example.com/SomePageThatUsesFoo2Style.aspx
When I go to http://header1.example.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.example.com/SomePageThatUsesFoo1Style.aspx
it works just fine. Also, if I go to http://header2.SomePageThatUsesFoo2Style.aspx
or http://header2.example.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.example.com
) and everything worked. I stopped the old site, and added header1
and header2
to the new site and the same error occurs.
Note: 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.
Any thoughts?
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.