By Compactman on
I pass the drupal clean urls test alright but when I turn it on all the images on the site seem to break. Ive been having problems with search engine indexing and someone told me that this might help get up in the ranking again.
Comments
It happened to me
What i did is, i inserted the
<?php file_path ?>in the image src: like:<img src="<?php base_path ?>your_image.jpg" />Hope this helps a bit.
tecito.com
Comunidad Latina en Canada, regístrate ya! Join the growing latin community in Canada.
I think I've got the same problem
I've found that if I navigate to a page using ?q=node (e.g. www.site.com?q=node/1) then it's fine.
But if I use /node/ (e.g. www.site.com/node/1) then images and some external javascript files break. I think this is because the page thinks it's in a sub-folder (e.g htdocs/node)
If I continue to navigate around the site then each new page I go to multiples the /node/ (e.g. Going from node 1 to node 2 translates to going from www.site.com/node/1 to www.site.com/node/node/2) . Did that happen to you too?
I had the same kind of problem with a 4.6 install and it was because base_url wasn't working. (I had commented out the variable that generated it :P)
But this is happening to me regardless of the clean url setting. Maybe I've stuffed up an install setting.
I have to fix this. When I do I'll let you know what I did.
I'm Running
Drupal 4.7.2
mySQL 4.1
php 4.3.10
on Apache
Found the answer
Here: http://drupal.org/node/59024
You just need to prefix a forward slash to your source link (src). So
<img src="images/image.gif">becomes<img src="/images/image.gif">.I believe this also applies to external javascript files and css files.
thanks
That solved the problem