title: htaccess breaks my images?
body: <p>I'm trying to rewrite a PHP file that dynamically displays images into .jpeg in the browser so it can look like an image path.</p>
  
  <p>My problem is that after introducing the rewrite rule, the images break. When I check the source code the image path is correct, but all I see is the "broken image icon".</p>
  
  <p>Help is very much appreciated!</p>
  
  <p>Here is the .htaccess</p>
  
  <pre><code>Options +FollowSymlinks
  
  RewriteEngine On
  RewriteRule ^images/([a-zA-Z0-9_-]+)\.jpeg$ image.php?id=$1
  </code></pre>
  
  <p>And here is the PHP/HTML code:</p>
  
  <pre><code>&lt;?php
  
  $imgname = ($_GET["id"]) . ".jpeg";
  $imgpath = "images/" . $imgname; 
  
  ?&gt;
  
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  
  &lt;link href="style.css" rel="stylesheet" type="text/css" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;?php 
  
  if (file_exists($imgpath)) {
  
     echo "&lt;img src='" . $imgpath . "'" . " alt='image'&gt;&lt;/img&gt;";
  
  } else {
  
      header("HTTP/1.0 404 Not Found");
  }
  
   ?&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>