I must be doing something terribly wrong because no matter how i try or google it, i can't find an answer :(
So, i want to have a url like http://localhost/BLUEPRINT/list/857 to actually load a perfectly working url like this: http://localhost/BLUEPRINT/list.php?lid=857
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/...
So for example this: <img src="images/logo.png" />
is actually something like this when requesting the seo-friendly url: <img src="list/857/images/logo.png" />
So what can i do?
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.
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!