Hi all,
I am working on generating search engine friendly URLs for my website and I was using the $PATH_INFO method.
Anyone who interested in learning, this is the article I followed.
But I’m really new to this concept and I have some question which I really think you guys can help me with.
now I don’t have to pass ID`s as query string (eg: http://www.mydomain.com/show.php?id=1), because now links are shown as folders.(Eg:http://www.mydomain.com/show.php/1)
But guys that’s when my problem comes in. when I implement this technique to my site all the images, css will disappear.
All my images and css links doesn’t have absolute urls. For example all the images are in my root "images" folder so the src attribute will have only images/filename.
I found out why it happens, because now my site url is displayed like folders (Eg:http://www.mydomain.com/show.php/1) so the browser will look images folder in "1" folder (according to my example). I can solve that problem by giving "../" to all my images and css links.
But I don’t want to do that. I want to use my existing php design and implement this technique. Can I do that? Or there’s any other way to implement this? Do I always need to use absolute url for every link in my site?
Your advice is highly appreciated.
Thanks in advance.
Regards,
Niroshan