title: Is it bad practice to use index.php instead of index.html?
body: <p>I'm not sure why it should be, but index.html feels 'right'. I'm using index.php because if my login fails, I want to return to index.php and show the returned error on in the initial log-in page, like this...</p>
  
  <pre><code>&lt;?php
     if(isset($_GET["loginFailed"])) {
        echo ($_GET['reason']);
     }
  ?&gt;
  </code></pre>
  
  <p>That's trimmed a bit, but the 'reason' will be deciphered by the php and a user-friendly error shown.</p>
  
  <p>The login error is just returned from my 'login.php' with something like..</p>
  
  <pre><code>if($row === false) {
      die(header("location:index.php?loginFailed=true&amp;reason=usernamenotfound"));
  }
  </code></pre>
  
  <p>This all works fine, but I have to keep the index named as index.php instead of index.html. If I change it to index.html, the php part is just ignored.</p>
  
  <p>Is there anything wrong with my approach? Is it unsafe or anything?</p>