title: Dealing with broken images in the context of friendly URLs
body: <p>I use the following <code>.htaccess</code> code to enable friendly URLs in a website.</p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?$1 [L]
  </code></pre>
  
  <p>It works as it's supposed to but there's something that bugs me. When, let's say, I request a page that has a <code>&lt;img src="sth.png" /&gt;</code> in it and <code>sth.png</code> does not exist on the server, the <code>.htaccess</code> code will instruct the server to make a request to <code>index.php?sth.png</code>, which would result in a completely unnecessary load of the whole framework of the website.</p>
  
  <p>What can I do to prevent that?</p>