title: noob's problem with mod rewrite and relative urls
body: <p>I must be doing something terribly wrong because no matter how i try or google it, i can't find an answer :(</p>
  
  <p>So, i want to have a url like <a href="http://localhost/BLUEPRINT/list/857" rel="noreferrer">http://localhost/BLUEPRINT/list/857</a>
  to actually load a perfectly working url like this: <a href="http://localhost/BLUEPRINT/list.php?lid=857" rel="noreferrer">http://localhost/BLUEPRINT/list.php?lid=857</a></p>
  
  <p>I can write the rewrite rule in the .htaccess file and i can read the lid variable. The problem is that all the paths in list.php are relative. Css, images, javascript e.t.c. So when the SEO-friendly url loads all those items are looked inside BLUEPRINT/list/857/...</p>
  
  <p>So for example this: <code>&lt;img src="images/logo.png" /&gt;</code> is actually something like this when requesting the seo-friendly url: <code>&lt;img src="list/857/images/logo.png" /&gt;</code></p>
  
  <p>So what can i do?</p>
  
  <p>I could probably try to convert all paths in the page(s) to root relative (ex. "/BLUEPRINT/images/logo.png") instead of relative. But there are dozens in the page and even if i do, they will not work on the actual server because there it sould be "/images" instead of "/BLUEPRINT/images". So i could not just upload my files to the actual server.</p>
  
  <p>What are my options? How do all these wonderful scripts out there like wordpress, joomla, e.t.c. handle this problem? What the hell am i doing wrong? It drives me crazy!</p>