I have all the code for my website’s home page as “home.html”, however I want to be able for someone to just type in “example.com” and go to the “home” page instead of having to type in “example.com/home.html”. How do I do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Web servers are usually configured to serve a file with a specific name when asked for the root level of a directory. Some examples are:
index.htmindex.htmlindex.xmlindex.rxmlindex.aspdefault.aspdefault.aspxindex.phpindex.cgiindex.shtmliisstart.htmAs you understand, this can vary greatly from server to server and from configuration to configuration.
So, either re-configure your web server to treat “home.html” as a valid home page, or change its name to whatever your server is configured to use.
In Apache, this is configured with the DirectoryIndex directive.
In IIS, these are called Default document.