mani_ Posted December 19, 2005 Share Posted December 19, 2005 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 More sharing options...
scott100 Posted December 19, 2005 Share Posted December 19, 2005 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 More sharing options...
aspnetguy Posted December 19, 2005 Share Posted December 19, 2005 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 More sharing options...
real_illusions Posted December 19, 2005 Share Posted December 19, 2005 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 Link to comment Share on other sites More sharing options...
aspnetguy Posted December 19, 2005 Share Posted December 19, 2005 plus it saves confusion and leaving hte .html is unnecessary Link to comment Share on other sites More sharing options...
F-Man Posted December 19, 2005 Share Posted December 19, 2005 If using Apache, look in the configuration file. Link to comment Share on other sites More sharing options...
mani_ Posted December 19, 2005 Author Share Posted December 19, 2005 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 More sharing options...
aspnetguy Posted December 19, 2005 Share Posted December 19, 2005 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 More sharing options...
mani_ Posted December 19, 2005 Author Share Posted December 19, 2005 How??I have ftp account through which i am uploading the files..how can i refresh the IIS of the server. Link to comment Share on other sites More sharing options...
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