Beautiful links

Hello

I am working on a php/mysql driven website. How can I short beautiful links?

e.g

/profile?id=1

would become

/profile/john

Also some of my scripts depend on things like $_GET[‘id’] so how I can do it so that is still functioning?

You should read more about mod_rewrite.
This is a good place to start: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html