Jump to content

How to change the default page.


mani_

Recommended Posts

Hello all..i need some information about web hosting..my friend have hosted a website which contains a page index.html as a default page....but then he said me to develop his website and i do it on php..as i have the default page index.php then how can i set the page from index.html to index.php such that whenever we type www.mydomain.com then index.php should open..any idea??

Link to comment
Share on other sites

One way would be to put this piece of code into the index.html page. The JavaScript will automatically forward the current page to the new page.<body onload="window.location.href = 'http://www.index.php'">This of course requires that the client machine has JavaScript enabled.hope this helps.

Link to comment
Share on other sites

If you have control over the server and are using IIS it is easy.Open IIS and click the Documents tab. There is a list of all default docuements. If index.php is not there add it, then make sure you move it up in the list so it is above index.html.I am a windows man so I can't help outside of that.If you are using a hosting company that supports PHP it should be in the list already, although if it still goes to the index.html first, just change index.html to index2.html so it will use the next default page int he list.

Link to comment
Share on other sites

using the IIS and i delete the index.htm from there .. all ok when i type mydomain.com on address bar without www it opens the index.phpbut when i type www.mydomain.com it opens the same file index.htm .. i delete it from the server but it still showing up..is it stored in cache of server or ISP's cache???

Link to comment
Share on other sites

try clearing your browsers cache and hitting refresh a couple of times.If this doesn't work, stop and then restart IIS. This should clear things out.Also you may want to check and see that www.mydomain.com and mydomain.com are setup.click on the 'web site' tab in IIS. are both of the domain variations listed? If not this could cause that problem.

Link to comment
Share on other sites

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...