Monday, November 22, 2010

How to set default www.my-website.com/index.php?

In my hosting at godaddy free host or other places, how do I set the default address in the browser as http://www.my-website.com/index.php ?



I asked this because whenever you typed www.my-website.com inthe browser, it did not show the ';index.php'; when loading. In consequence, the adsense from google became unprofitable Public Service Ads. But when the browsing forced to load index.php, it shows correct ads.



I tried .htaccess ';DirectoryIndex index.php';, without luck, I tried to change directory index to different file, still no luck, because there was no trail of /indexfile.php at the end of the address.



anybody know how to modified any settings to obtain automatic home address as www.my-website.com/index.php ?



thanksHow to set default www.my-website.com/index.php?
You can use the mod_rewrite functionality if enabled in Apache



in .htaccess



RewriteRule ^/$ http://www.my-website.com/index.php

No comments:

Post a Comment