title: apache server: redirect all url request to index.php
body: <p>I am using apache server on my mac, everything works well.</p>
  
  <p>Now I have a webpage, whose <code>index.php</code> is quite complex: 
  In <code>index.php</code>, it expects url like: <code>localhost/~username/hostname/page_a</code>.
  And the content of <code>page_a</code> is actually a <code>.php</code> file stored in <code>content</code> folder.
  So in <code>index.php</code>, it just parses <code>page_a</code>, and do a include: '' to render the request page.</p>
  
  <p>But In <code>.htaccess</code>, the redirect rule was not properly configured.</p>
  
  <p>For example, if I click a link: <code>localhost/~username/hostname/page_a</code>,
  is there any way to redirect this url to <code>index.php</code>,
  and at the same time, the url will still be <code>localhost/~username/hostname/page_a</code>,
  so that <code>index.php</code> can parse and render it correctly?</p>
  
  <p>Thanks.</p>