This project has moved. For the latest updates, please go here.

Serving "Website" output from a case-sensitive HTTP server

Topics: Developer Forum, User Forum
Oct 8, 2007 at 5:37 PM
I'm using Sandcastle Help File Builder to generate "Website" output. (Overall, I'm very pleased with it. I can't imagine using Sandcastle without it.)

I will be serving the generated Web pages from an Apache Web server. Apache is strictly case-sensitive, with regard to file naming.

Now, the generated index page is named "Index.html". When Apache attempts to serve the contents of my documentation directory, it is looking for a file called "index.html". It can't find it. So, I get a 404 error.

I tried renaming "Index.html" to "index.html". That solved that first problem. However, many of the generated HTML files reference the "Presentation.css" style sheet. The name of the file in the file system is "Presentation.css". However, the HTML files reference the style sheet as "presentation.css". Renaming the file in the file system from "Presentation.css" to "presentation.css" solved the second problem.

However, I'm wondering if I'm likely to encounter more problems.

Has anyone else served a Sandcastle-generated Web site from a case-sensitive HTTP server? Do you have any tips or cautions?

Thanks for any information.
Oct 8, 2007 at 8:12 PM
You can probably modify the Sandcastle transformations to correct the casing and make it consistent. Script filenames are another area you might run into the casing issue.

Oct 19, 2007 at 9:24 PM
I'm not an expert in Apache. But I managed to find a solution.
1. Create a file named .htaccess under the /styles folder
2. Add the following text to the .htaccess file:

RewriteEngine On
RewriteRule ^Presentation.css$ Presentation.css NC

You should be all set.