在网址中搜索查询[重复]

I'm currently working on a project almost like steamrep.com but for another game and more features. I know basic php js etc but there is 1 thing i can't seem to understand. And that is when you for ex search for

     yourdomain.com/profiles/ (any id / username) 

I can't seem to figure out how to make it so it takes the givin id / username puts it as a variable and display it on a page.

If anyone could give me a lead that would be verry much appreciated!

EDIT: To clear up the question. I want to take the id or username from the url and display it the page as a variable.

</div>