Search code examples
phpvirtual-directory

How to create virtual directories in PHP?


I want to create an application in PHP implementing virtual directory feature.
Example: http://mydomain.com/user001 will display the contents of the url http://mydomain.com/index.php?user=user001. How can I do that?

Note:
I am using Apache server.


Solution

  • The traditional way to do it is mod_rewrite.