nltrade Posted February 13, 2021 Share 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? Quote Link to comment Share on other sites More sharing options...
Luigi123 Posted February 13, 2021 Share 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! Quote Link to comment Share on other sites More sharing options...
nltrade Posted February 13, 2021 Author Share 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? Quote Link to comment Share on other sites More sharing options...
Luigi123 Posted February 13, 2021 Share 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! Quote Link to comment Share on other sites More sharing options...
wolstech Posted February 13, 2021 Share 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.