Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using free hosting with 000webhost.com, for that the default page it loads is default.php. But I've installed WordPress and now WordPress generated index.php as its homepage file.

As an easy solution, I just redirected from default.php to index.php when the page loads using the code:

<meta http-equiv="refresh" content="0; url=http://thigale.com/" />

But can anyone suggest me any other way? Instead of this stupid process?

share|improve this question
Please explain what you don't like about the current setup. Would you rather do a real redirect rather than an meta refresh? Do you want index.php to become the homepage? – Stephen Ostermiller Jan 11 '14 at 11:56
Yes. I want index.php to become my homepage – Sameer Thigale Jan 11 '14 at 14:00
up vote 1 down vote accepted

For servers using Apache as a server you can create a file named .htaccess in the root of the domain with the content:

DirectoryIndex index.php index.html

The Apache server must also have .htaccess enabled. If the .htaccess file already exists you should add the line above to the existing file.

share|improve this answer
It should work for subdomains too? – Sameer Thigale Jan 11 '14 at 14:15
Yes, that will work for subdomains too if you put the setting in the .htaccess file for each subdomain. – Stephen Ostermiller Jan 11 '14 at 14:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.