title: Get parameters from url with .php already removed
body: <p>I have got my urls rewriting, removing .php and replacing with a /</p>
  
  <p>currently the .htaccess looks like this - </p>
  
  <pre><code>RewriteEngine On
  
  
  RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
  RewriteRule ^ %1/ [R,L]
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_URI} !/$
  RewriteRule . %{REQUEST_URI}/ [L,R=301]
  
  
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME}.php -f
  RewriteRule ^(.*?)/?$ $1.php [L]
  </code></pre>
  
  <p>although now, I am trying to pass a GET parameter, </p>
  
  <p>When i add this to the .htaccess - </p>
  
  <pre><code>RewriteRule ^(.*)$ public_profile.php?params=$1 [NC]
  </code></pre>
  
  <p>or this</p>
  
  <pre><code>RewriteRule ^(.*)$ public_profile/params=$1 [NC]
  </code></pre>
  
  <p>And navigate to localhost/pages/public_profile/myparam</p>
  
  <p>I get an internal server error.</p>
  
  <p>I've also tried putting the .htaccess in side the pages/public_profile directory with </p>
  
  <pre><code>RewriteEngine On
  
  RewriteRule ^(.*)$ index.php?params=$1 [NC]
  </code></pre>
  
  <p>And when I navigate to <a href="http://localhost/pages/public_profile/" rel="nofollow noreferrer">http://localhost/pages/public_profile/</a></p>
  
  <p>and print $_GET , "index.php" is printed</p>
  
  <p>Can any one point out what I am doing wrong?</p>