i have it so when a user signs up, it will create a directory
blah.com/username
but my question is how do i make it so there is a index.php file in that directory, and it will retrieve all the information through a database?
cause usually i do view.php?id=999, and i would grab the information of the user from the database using GET ID 999
but how do i make it so each user has blah.com/username
thanks!
user registration and directory question
Moderator: General Moderators
hmm i recently did this using mod_rewrite
it will take your blah.com/view.php?ID=username and make a blah.com/username URL out of it.. giving the illusion that each person has their own directory.
You need to edit (or create) your .htaccess file and add the following lines:
Edit: I'm not too familar with mod rewrite, but I think it's for Apache servers only.
it will take your blah.com/view.php?ID=username and make a blah.com/username URL out of it.. giving the illusion that each person has their own directory.
You need to edit (or create) your .htaccess file and add the following lines:
Code: Select all
RewriteEngine on
RewriteRule ^([a-zA-Z0-9_-]+)(/)?$ view.php?ID=$1Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
In your root directory
usually something like:
/home/usr/public_html/
usually something like:
/home/usr/public_html/
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.