02-14-2009, 01:40 PM
|
#2 (permalink)
|
|
The Contributor
Join Date: Jan 2009
Posts: 40
Thanks: 10
|
Its called mod_rewrite. You use a .htaccess file to rewrite the url. For example:
The raw php URL will look like:
Code:
http://example.com/?user=Scottymeuk
But with the following mod_rewrite code in a .htaccess file (In the root):
Code:
RewriteEngine on
RewriteRule user/(.*)/$ /?user=$2
It will turn out like:
Code:
http://example.com/user/Scottymeuk
So overall, they are not real directories, they are actually getting the information from the database using php but its being rewrote using a .htaccess file.
Please note: I have not tested this code.
|
|
|
|