nltrade Posted February 13, 2021 Posted February 13, 2021 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?
Luigi123 Posted February 13, 2021 Posted February 13, 2021 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!
nltrade Posted February 13, 2021 Author Posted February 13, 2021 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?
Luigi123 Posted February 13, 2021 Posted February 13, 2021 It should work, just as long as you don’t receive any errors that are given to you, then you are good to go!
wolstech Posted February 13, 2021 Posted February 13, 2021 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now