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.
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.
Please read this freidnly article regarding rewrite:
http://www.noupe.com/php/10-mod_rewrite-rules-you-should-know.html
Next, try to find a simple way in PHP to pharse this variable $_SERVER['REQUEST_URI'].
After toing that, you have the name of the directory and you can get its data from the DB