How to redirect requests to my URL to somefile.php not index.php

Amna Ahmed asked:

How can i redirect all the requests that are made to www.mysite.com to www.mysite.com/index_main.php and then rewrite www.mysite.com/index_main.php as www.mysite.com

My answer:


Use the Apache DirectoryIndex directive to specify which file or files should be treated as the directory index.

Example:

DirectoryIndex index_main.php

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.