title: htaccess redirect hiding the php extension or pass a parameter
body: <p>I'm using a main index.php file to handle the most of requests, so my basic .htacess looks like <a href="https://stackoverflow.com/questions/2441140/using-htaccess-rewrite-redirect-so-single-php-file-can-display-data-according-to">this one</a>:</p>
  
  <pre><code>RewriteEngine on
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.+)$ /index.php?page=$1 [L]
  </code></pre>
  
  <p>But i've got some requests (like /signin or /signout) that needs to be handled directly from .php file with the same name (/signin.php and /signout.php).</p>
  
  <p>So my .htaccess rules needs to be: "<code>if %{REQUEST_FILENAME}.php</code> does not exists redirect to <code>/index.php?page=$1</code> else redirect to <code>%{REQUEST_FILENAME}.php</code>".</p>
  
  <p>How can i do this?</p>