Jump to content
Sign in to follow this  
mani_

How to change the default page.

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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

could use meta redirect tags.:)but having the first index file as .php and not .html or .htm just saves that little bit of space on the server

Share this post


Link to post
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???

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

How??I have ftp account through which i am uploading the files..how can i refresh the IIS of the server.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...