title: How to pass URL variables into a WordPress page
body: <p>This has been asked on here (over a year ago), but apparently not answered, and WordPress is always evolving so maybe theres a good solution now.  I want to pass variables to a WordPress page via the url (similar to CodeIgniter uri helper segments).</p>
  
  <p>Currently I can do this...</p>
  
  <p>My profile page is:
  <a href="http://website.com/profile" rel="nofollow noreferrer">http://website.com/profile</a></p>
  
  <p>I can pass a variable like this:
  <a href="http://website.com/profile?username=johndoe" rel="nofollow noreferrer">http://website.com/profile?username=johndoe</a></p>
  
  <p>I want to pass the variable in like this:
  <a href="http://website.com/profile/johndoe" rel="nofollow noreferrer">http://website.com/profile/johndoe</a>
  or
  <a href="http://website.com/profile/username/johndoe" rel="nofollow noreferrer">http://website.com/profile/username/johndoe</a></p>
  
  <p>There has to be some sort of helper function, right?</p>