Reputation: 14235
How to change the default url. eg www.example.com/index.php -> www.example.com
now i want to set it to www.example.com/test.php. Should i make changes in php.ini?
Upvotes: 2
Views: 2742
Reputation: 15905
You could set the htaccess DirectoryIndex
to include test.php:
DirectoryIndex test.php index.php index.html
You could also setup a redirect from index.php:
header('Location: test.php'); //Must be before any content is sent out
Redirects will work from htaccess too:
Redirect 301 index.php test.php
The simplest thing to do, however, would be renaming the test.php file to index.php. Why not just do that? :P
Upvotes: 1
Reputation: 449613
You would have to change this in Apache's configuration using the DirectoryIndex
directive.
e.g. (In the correct VirtualHost
section):
DirectoryIndex test.php
Although I can't see why on earth one would want to do that...
Upvotes: 0
Reputation: 13461
Assuming you are using apache, you can do this through the DirectoryIndex
directive.
Upvotes: 3