Link to home
Start Free TrialLog in
Avatar of shooksm
shooksm

asked on

Default Documents sending 404 error even when configured in IIS

I have recently built a web server running IIS 5.0 on Windows 2000, but am having trouble getting the default documents (index.htm, default.asp, index.cfm, etc.) to be returned to the client's browser unless they're explicitly declared in the URL (http://www.foo.com/bar returns a 404 error while http://www.foo.com/bar/index.cfm works).  Each of these documents is listed in the "Documents" tab in the web site's properties settings under the heading "Enable Default Document" , and this option has been selected.  What other setting(s) should I check or modify to correct this problem?  
Avatar of chaniewskim
chaniewskim

It is possible to have specified default document for a website, but cleared for its subdirectory. In your case: you have default document 'index.cfm' listed in website properties, but not in /bar directory properties. Check it.

Also, check casing of filenames in website properties and on your file. This shouldn't be a case, because IIS ignores case, but better check than sorry.
Avatar of shooksm

ASKER

Good suggestion.  Checked out the offending sub folders and they are set with the same default documents.  Any other ideas?
No idea. Is that 404 or 403?
Avatar of shooksm

ASKER

404, which is strange as directory browsing is disabled so you would think you would get a 403 error if it could not find a default doc.
Is that problem only with index.cfm or with index.htm is the same?
Avatar of shooksm

ASKER

Wow, just tried index.htm, index.asp, index.cfm, default.htm, default.asp and default.cfm and none of them worked even though they are all set as default documents.  Is there any way to determine what file IIS is saying doesn't exist?
ASKER CERTIFIED SOLUTION
Avatar of chaniewskim
chaniewskim

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
OK, check also:

- if your wwwroot or bar directory does not have 'hidden' attribute set
- extended status code, if it is shown:
404.0 - (None) – File or directory not found.
404.1 - Web site not accessible on the requested port.
404.2 - Web service extension lockdown policy prevents this request.
404.3 - MIME map policy prevents this request.

If nothing of this give you any additional hints, then check if default document works for root URL (http://www.foo.com/)

And, tell mi what is your /bar folder. Where is it placed - in wwwroot? Is it virtual directory?
There are sometimes problems when you have a physical folder in wwwroot and also virtual directory of the same name created in IIS. Check if it is the case here.
Avatar of shooksm

ASKER

Sure enough.  Checked the log file and found a URLScan program we have that filters out known exploits was causing it to redirect requests from "http://www.foo.com/bar" to "http://www.foo.com/bar/." thus causing the 404 error.  Disabling the URLScan app allows us to use the default documents again, now we just need to play around with the URLScan rules and figure out.