title: .htaccess Issues with 404 and URL Rewriting
body: <p>I've got an <code>.htaccess</code> with the following code inside it:</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^([^\.]+)$ $1.php [NC]
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ 404.php [L]
  </code></pre>
  
  <p>The purpose of this is to</p>
  
  <ul>
  <li><p>Remove the <code>.php</code> extension from the url</p></li>
  <li><p>Rewrite the url so that <code>POST</code> data will appear after the slash i.e. if the original url were to be <code>website.com/sheet?username=bob</code>, this would be rewritten to <code>website.com/sheet/bob</code></p></li>
  <li><p>Redirect to a custom 404 page when the specific url given is not found</p></li>
  </ul>
  
  <p>This code performs fine while developing locally via WAMP, and I am able to see different info based on the <code>&lt;user&gt;</code> value of <code>website.com/sheet/&lt;user&gt;</code>. </p>
  
  <p>When I go to upload the changes to the live site, the code no longer works, and shows <code>website.com/sheet/bob</code> as my custom 404 page.</p>
  
  <p>Is my <code>.htaccess</code> wrong? Sorry, I'm pretty inexperienced with <code>.htaccess</code>.</p>
  
  <hr>
  
  <p><strong>Edit</strong> If I remove the <code>.htaccess</code>, if I attempt to go to <code>website.com/sheet.php</code>, I get the following error:</p>
  
  <pre><code>Internal Server Error
  
  The server encountered an internal error or misconfiguration and was unable to complete your request.
  
  Please contact the server administrator, webmaster@website.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
  
  More information about this error may be available in the server error log.
  
  Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
  </code></pre>
  
  <p>This does <strong>not</strong> produce an <code>error</code> file in my document root though, so I'm unsure exactly how to see the issue :s</p>
  
  <hr>
  
  <p>Thanks</p>