title: mod_rewrite /p/about => ?p=about
body: <p>i have a specific question concerning mod_rewrite:</p>
  
  <p>when the user calls:</p>
  
  <blockquote>
    <p><strong>www.test.com/p/about</strong></p>
  </blockquote>
  
  <p>the webserver should call internally</p>
  
  <blockquote>
    <p><strong>www.test.com/?p=about</strong></p>
  </blockquote>
  
  <p>to access subpages of the website.</p>
  
  <p>but in the adress bar it should still say</p>
  
  <blockquote>
    <p><strong>www.test.com/p/about</strong></p>
  </blockquote>
  
  <p>is this anyhow possible with mod_rewrite?</p>
  
  <p><strong>My solutions that did not work out:</strong></p>
  
  <p><ol>
  <li>Try</p>
  
  <blockquote>
    <p>RewriteRule ^/?([-a-zA-Z0-9_+]+)$ index.php?p=$1 [L] </li>
    </ol>
    Wrong effect, because it only works with: test.com/about, but I need test.com/p/about!</p>
  </blockquote>
  
  <p><ol>
  <li>Try</p>
  
  <blockquote>
    <p>RewriteRule ^p/([a-zA-Z]+)$ index.php?p=$1</li>
    </ol>
    Error: it redirects correct but the paths on the html file are wrong: eg. /img/pic.png is now /p/img/pic.png</p>
  </blockquote>
  
  <p>big thanks,
  stee</p>