Reputation: 679
I am dot net developer. I place web.config and index.html
page and write some code in web.config.
it opens the index.html default or startup page when I enter my website address in the browser.
Now my question is here, I have PHP cPanel and domain, I want to place index.html
page and open it as a startup page. but I found an irrelevant solution according to my problem statement.
How can I do this?
I tried, I placed the index.html page
in public_html
but the page did not open.
any solution, please.
Upvotes: 0
Views: 511
Reputation: 842
What is the web server you are using?
If you are using Apache or Nginx, it should load the index.html as default (Start) page. Make sure, you have the index.html in the web root directory.
Upvotes: 1
Reputation: 9373
Please, this code in web.config
file in the public_html
folder.
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="index.html"/>
</files>
</defaultDocument>
</system.webServer>
You can also set a priority of files execution in web.config
file as:
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="index.html" />
<add value="iisstart.htm" />
<add value="default.aspx" />
<add value="index.php" />
Upvotes: 0