Website not applying CSS UNLESS the FULL path to index is specified

Posted on 2012-09-22
Last Modified: 2012-09-22
Hi I have a site that has been fine for a long time now but recently I have moved it from a windows server to a Linux/Centos one.

Now if I type the web address (as above) into my browser I just see a listing of the sites files. If however, I type the web address AND put the Index.html on the end the site displays fine..

I'd like to know why ?

Thank you all.......
Question by:mrmad1966
    LVL 35

    Accepted Solution

    What webserver are you using? Moving from IIS to Apache can be a lot of work. In this case it could be as simple as adding Index.html (or index.html, if case sensitive) as a default document, but there could be a lot more going on.
    LVL 50

    Assisted Solution

    by:Julian Hansen
    You need to setup your default document for the webserver - but I think your problem here is case related

    Change Index.html to index.html

    Linux is case sensititve - Windows is not - you might need to check the rest of your site to make sure all index.html references are lower case.

    You don't need to worry about the other pages (unless they don't load)
    LVL 107

    Assisted Solution

    by:Ray Paseur
    Who is the hosting company?  On my hosts, there is a cascade that causes the server to render the files in this order:


    If your not getting the page by typing in http://localhost/ check the httpd.config file.

    In the httpd.conf, is the default address the browser will use to access your files. It is actually something like http://localhost/xampp/index.php in the address bar. You shouldn't have to type all that in though.

    Look for this in the httpd.conf file (and add it if it is not there):

    <IfModule dir_module>
    DirectoryIndex index.html index.php

    You may also need to check DocumentRoot.  You can find more information with a Google search for httpd.conf.  This link might be helpful:
    LVL 1

    Author Closing Comment

    Appreciate the responses. yes just the case sensitive issue. Split the points but weighted towards Robert purely as he was the first to answer..
    Thanks again..
    LVL 107

    Expert Comment

    by:Ray Paseur
    Thanks for the points.  Yep, Linux is case-sensitive for all file names.  This means that your programming around file system functions, including URLS in your embedded links, may need some work.

    Case-sensitivity in PHP, without regard to OS: Constants and Variables.  Class and function names are not case-sensitive, nor are the named booleans.

    Best of luck and welcome to the light side, ~Ray
    LVL 1

    Author Comment

    Thank you Ray... Sound advice !! Appreciated.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit ( and similar technologies have enjoyed wide adoption, making it possib…
    Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
    In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
    In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now