tags:

views:

157

answers:

3

Can I do that thing that twitter and many other sites do where a url shows a users page.

www.mysite.com/the_user_name

In php... or how does one do it?

+6  A: 

Look into how to use the mod_rewrite module in .htaccess.

Here's some ALA goodness:

  1. How to Succeed With URLs
  2. URLS! URLS! URLS!
Evan Meagher
Thanks. Just had no idea what to even look for. Now I got it!
ian
+1  A: 

The easiest way that I know of is to create a .htaccess file for the website with the RewriteEngine turned on.

For example

RewriteEngine On

RewriteRule ^(.+) /index.php?user=$1

Do a google search for .htaccess and RewriteEngine to get a better grasp of the process or creating an .htaccess file.

Goblyn27
+3  A: 

The easiest method would be to use mod_rewrite in Apache (as opposed to doing it in PHP). Here's a good beginner's guide.

tj111