Jump to content

[Answered] specifying main website file


Recommended Posts

Posted

Hi folks, newbie here, the main page for my website is something other than index.html, how do I tell the server the name of this file? 

Posted

If you have contents in your .HTML file inside of your public_html folder, then you can simply view it as yourdomain.heliohost.us/yourfile.html into the search bar address.

 

If you want, you can also use a “Redirects” feature inside cPanel underneath Domains to point to your html file so that way your users will able to view your contents page instead taking them to the /index page and letting touch your files which you don’t want that! :)

Posted

If you have contents in your .HTML file inside of your public_html folder, then you can simply view it as yourdomain.heliohost.us/yourfile.html into the search bar address.

 

If you want, you can also use a “Redirects” feature inside cPanel underneath Domains to point to your html file so that way your users will able to view your contents page instead taking them to the /index page and letting touch your files which you don’t want that! :)

 

Thanks - will the same work for a .php file? 

Posted

The proper way to do this is with the .htaccess file.

 

Add a line that looks like the below, it's a space-separated list of files to use as the index. The server will try each in order if the one before it is not found:

DirectoryIndex first.html index.htm index.html index.php

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...