Forum Moderators: phranque
the css (this is a background image) url is /images/banners/image.jpg
the site root is /dcmms (I have several sites here so this is the "root" for that one).
If I put "dcmms/" in front in firefox the image appears.
The live site (remote) works and delivers the image to the page OK with the above url. The live site root is (of course) different so I cannot change the background urls.
The HTML image urls work on both sites.
I assume I need some sort of redirect in apache (not in .htaccess then I would need two, one for live site and one for local).
This is a mystery to me and would appreciate some help.
In your error log, you will see the filepath (not the URL) for the failed CSS file access. It will be incorrect -- either missing a filepath-part, or with an additional, incorrect filepath-part. What is wrong with it?
By combining the information from both of these questions, it is almost always possible to figure out what is wrong. It is likely that DocuementRoot is incorrect, and that the CSS filepath is therefore being constructed incorrectly from the requested URL-path.
Jim
DocumentRoot "c:/wamp/www/"
Other parts that may be relevant are:
Include "c:/wamp/alias/*"
ServerRoot "c:/wamp/bin/apache/apache2.2.10"
Here is the access log where it is the last one which does not appear:
127.0.0.1 - - [26/Feb/2009:08:57:07 +0000] "GET /dcmms/templates/beez/images/reset.gif HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2009:08:57:08 +0000] "GET /dcmms/modules/mod_gk_news_image_1/images/load.gif HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2009:08:57:08 +0000] "GET /dcmms/components/com_gk2_photoslide/images/thumbm/910507turnball.png HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2009:08:57:08 +0000] "GET /dcmms/components/com_gk2_photoslide/images/thumbm/394061londonConcertante.png HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2009:08:57:08 +0000] "GET /dcmms/components/com_gk2_photoslide/images/thumbm/891475victoria.png HTTP/1.1" 304 -
127.0.0.1 - - [26/Feb/2009:08:57:08 +0000] "GET /images/banners/dukes2.jpg HTTP/1.1" 404 223
127.0.0.1 - - [26/Feb/2009:08:57:12 +0000] "GET /dcmms/images/banners/dukes2.jpg HTTP/1.1" 304 -
IF I put (in firefox firebug) ../../../ or dcmms/ to the css background path (dukes2.jpg) it works. Not correct images (in the html source) do have the dcmms/ in front of them and do work.
[edited by: cantthinkofanickname at 8:14 am (utc) on Feb. 28, 2009]
<div class="banneritem"><p id="banp1">DUKE'S</p>
<p id="banp2">Auctioneers since 1823</p>
.....
As you can see the "dcmms/" has not been added whereas in the html example:
<div id="header">
<h1 id="logo">
<img src="/dcmms/templates/beez/images/dcmmsLogo.png" border="0" alt="DCMMS Logo" />
it has.
background:#D6EACC url(/images/banners/dukes2.jpg) no-repeat scroll 0 0;
<img src="/templates/beez/images/dcmmsLogo.png" border="0" alt="DCMMS Logo" />