I have to do something terribly wrong, because, no matter how I try to do this, I can not find the answer :(
So I want to have a url like http: // localhost / BLUEPRINT / list / 857 actually load a perfectly working url like this: http: //localhost/BLUEPRINT/list.php? Lid = 857
I can write a rewrite rule in the .htaccess file, and I can read the cover variable. The problem is that all the paths in list.php are relative. Css, images, javascript etc Therefore, when a SEO-friendly URL loads all of these elements, BLUEPRINT / list / 857 / ... is scanned.
So, for example, this: <img src="images/logo.png" /> is actually something like this when querying the seo-friendly url: <img src="list/857/images/logo.png" />
So what can I do?
I could probably try converting all the paths on the page (s) to a relative root (for example, "/BLUEPRINT/images/logo.png") instead of a relative one. But there are dozens on the page, and even if I do, they wonβt work on the real server, because there may be β/ imagesβ instead of β/ BLUEPRINT / imagesβ. Therefore, I could not just upload the files to the actual server.
What are my options? How do all these wonderful scripts exist, for example wordpress, joomla, etc to handle this problem? What the hell am I doing wrong? It drives me crazy!
url seo mod-rewrite
fractalbit
source share