0

I have a file named index.php that contains some code and its directory address is: http://www.example.com/user/index.php

I want to open this page in the root directory so that user think this is index page like this: http://www.example.com/index.php

In this way my php file address is www.example.com and not www.example.com/user

What is the simplest way to do this?

UserMat
  • 600
  • 4
  • 10
  • 27

1 Answers1

1

This is handled by your web server, not PHP. Check your Apache / IIS / etc settings for DocumentRoot of given VirtualHost definition.

As SGT noted you can also use URL Rewriting, but again, that too is handled by the web server and has nothing to do with PHP.

Tuncay Göncüoğlu
  • 1,699
  • 17
  • 21