title: Laravel, mod_rewrite, and removing .php extension
body: <p>I've begun the process of rebuilding a site within Laravel 4.</p>
  
  <p>The URLs of this site are currently served with the .php extension. Customers have these pages bookmarked so it's important I redirect them to the same page minus the .php extension.</p>
  
  <p>Example: I would like <code>/contact.php</code> to redirect to <code>/contact</code>.</p>
  
  <p>Laravel ships with this in its htaccess file:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      Options -MultiViews
      RewriteEngine On
  
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>I'm not well versed in regular expressions or Apache's own syntax. I found <a href="https://stackoverflow.com/questions/1698464/mod-rewrite-to-remove-php-but-still-serve-the-php-file">this comprehensive answer</a> to serving php files without the .php extension, but Laravel routes everything through index.php, so that solution doesn't seem to work.</p>
  
  <p>How do I universally redirect URLs with .php to the same page without the extension?</p>