Every single time a user registers on my site I would like them to have their own subdirectory with their registered "username". Every user subdirectory will have the same "index.php" file which will do something.
For example: "/users/username1/" and "/users/username2/"
If some one wants to access the subdirectory they would simple go to: "www.example.com/users/username1/" or "www.example.com/users/username2/"
The easy and messy solution would be to simply create a subdirectory for every user and place the same "index.php" file in every directory. But to me this is only going to crowd my server space and make my directories large.
I wanted to know if all this can be done using .htaccess? Can I create one "index.php" and one ".htaccess" file and place them both in my "/users/" directory? What would be the actual code that I would have to place in my .htaccess file??
If you have a better way of doing this please let me know. I am using Apache and PHP as my working environment.
Thank you