title: mod_rewrite VS relative paths
body: <p>My mod_rewrite code is:</p>
  
  <pre><code>Options +FollowSymLinks
  Options +Indexes
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.+)?$ index.php?url=$1 [L,NC]
  </code></pre>
  
  <p>This structure is placed on my server path <code>/beta</code></p>
  
  <p>When I place the URL <code>http://mydomain.com/beta/download</code> everything works rewriting to the real path <code>http://mydomain.com/beta/index.php?url=download</code></p>
  
  <p>The problem happens with the relative paths. When I enter the URL <code>http://mydomain.com/beta/download/box</code> the rewriting goes to <code>http://mydomain.com/beta/index.php?url=download/box</code>...  but....</p>
  
  <p>All my relative paths, like my css folder, my js folder, image files....  everything with relative path in my index.php page crashes, cuz my relative paths become <code>download/css</code>, <code>download/js</code>, <code>download/images</code>... etc...</p>
  
  <p>I know this problem happens in reason of the slash in the path "download/", but how can I solve that using the mod_rewrite in .htaccess?</p>
  
  <p>Can I prevent rewriting in relative paths? Or even in internal paths of my own domain?</p>
  
  <p>How can I solve that WITHOUT change my relative paths to absolute paths?</p>
  
  <p>Thanks</p>