How to create virtual directories in PHP?

chanchal1987 picture chanchal1987 · Sep 7, 2010 · Viewed 8.8k times · Source

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.

Answer

Karmic Coder picture Karmic Coder · Sep 7, 2010

The traditional way to do it is mod_rewrite.