title: url rewriting - rewriting image path to internal folder
body: <p>I want to add a rule to redirect jpg files to a directory beyond the document root. I already use the following which rewrites anything without a file extension.</p>
  
  <pre><code>Options Indexes FollowSymLinks Includes ExecCGI
  RewriteEngine On
  RewriteBase /
  RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
  RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
  RewriteRule ^[^.]+$ /index.php/$1 [L]
  </code></pre>
  
  <p>I want to achieve </p>
  
  <p><code>http://www.mysite.com/i/image_type/12345.jpg</code></p>
  
  <p><code>=&gt;
  </code>
  <code>
  /internal_path/image_type/12345.jpg</code></p>
  
  <p>EDIT In this case I ended up using a symbolic link. I am not sure if it was the best solution but it served my requirements.</p>