title: Concept - Serving dynamic content based on URL path?
body: <p>For example, </p>
  
  <p>the user types in,</p>
  
  <pre><code>www.foob.com/some_path
  </code></pre>
  
  <p>I don't want to actually have a some_path folder for every different identifier the user might use ... for example if it is a person's name, as seen in many social apps.</p>
  
  <pre><code>www.foob.com/some_path1
  </code></pre>
  
  <p>However, i would like to read it in as a variable and serve the relevant content</p>
  
  <p>JavaScript</p>
  
  <pre><code>var foo = 'some_path1'
  </code></pre>
  
  <p>PHP</p>
  
  <pre><code>$foo = 'some_path1';
  </code></pre>
  
  <p>How do I get 'some_path1' into foo?</p>
  
  <p><strong>Note</strong></p>
  
  <p>some_path is a variable, it might contain</p>
  
  <pre><code>some_path_1
  some_path_2
  some_path_3
  </code></pre>
  
  <p>Clarification</p>
  
  <p>So take facebook.com</p>
  
  <p>if you go to </p>
  
  <pre><code>www.facebook.com/your_name
  </code></pre>
  
  <p>it's not like there is a different directory for all 1 billion users.</p>
  
  <p>A generic page is served populated with user specific data.</p>
  
  <p>How do I get the id your_name?</p>