title: .htaccess clean URL and relative paths
body: <p>I have the following in my .htaccess which is :</p>
  
  <pre><code>RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^([^/]+)$ /index.php?type=cat&amp;id=$1 [QSA,L]
  RewriteRule ^page/([^/]+)$ /index.php?type=page&amp;name=$1
  </code></pre>
  
  <p>This seems to work just fine but relative paths to pictures and css files inside of index.php become broken in the second case (Page). did not work. In second case, all images are pointing to page/images/ instead of image/</p>
  
  <p>Other than hardcoding the actual path to images, is there any other way to fix this?</p>
  
  <p>images, css, js folders are located in the root. This is how the root looks like</p>
  
  <pre><code>.htaccess
  index.php
  images/
  css/
  js/
  </code></pre>