title: check URL rewriting code
body: <p>I've been working on this URL rewriting .htaccess code but some people have said that I am doing it wrong or backwards:</p>
  
  <pre><code>RewriteEngine On
  
  RewriteCond %{THE_REQUEST} /index\.php\?(.*)p=(?!admin)(?!superadmin)((?![^&amp;]*?edit)[^\s&amp;]+) [NC]
  RewriteCond %{THE_REQUEST} /index\.php\?(.*)p=([^&amp;\ ]+)&amp;?([^\   ]*) [NC]
  RewriteRule ^ /%2?%1%3 [R=301,L]
  
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^([^/]+)/?$ index.php?p=$1 [L,QSA]
  </code></pre>
  
  <p>Ultimately I want the user not to see the links with query strings but I need the query strings to still exist and be usable somehow so that I can check for values of $_GET variables.</p>
  
  <p>In other words I need this:
  - domain.com/index.php?p=Home to be rewritten as domain.com/Home
  - domain.com/index.php?p=Bio to be rewritten as domain.com/Bio
  - when a user clicks a link from the home page that points to domain.com/index.php?p=Bio they should see domain.com/Bio in the browser's url bar but I should still be able to echo $_GET['p'] and get 'Bio' when I land on the Bio page.</p>
  
  <p>Make sense?</p>
  
  <p>Thanks for your help in advance!</p>