PDA

View Full Version : Problem calling images on site



flyingspatulas
06-17-2008, 12:14 AM
For some reason none of the images on my site will load, even though I know they are in the right places. This just started happening a few days ago and no matter what I do I can't seem to get it fixed.

If I go directly to the image url, it shows up no problem.
http://www.robert-pattinson.co.uk/images/temp_1.png

However, on the page that is calling the image, nothing.
http://www.robert-pattinson.co.uk/

The html on the page is fine as far as I can tell.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Pattinson Online (temp site)</title>
<link rel="stylesheet" type="text/css" href="http://www.robert-pattinson.co.uk/style.css">
</head>

<body>
<table width="535" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th scope="col"><div align="left"><img src="http://www.robert-pattinson.co.uk/images/temp_1.png" width="548" height="126" border="0" usemap="#Map" /></div></th>
</tr>

<tr>
<td><div>
<div align="left"><img src="http://www.robert-pattinson.co.uk/images/temp_2.png" width="548" height="126" /></div>
</div></td>
</tr>
<tr>
<td><div align="left"><img src="http://www.robert-pattinson.co.uk/images/temp_3.png" width="548" height="126" border="0" usemap="#Map2" /></div></td>
</tr>
<tr>

<td valign="top">&nbsp;</td>
</tr>
<tr>
<td valign="top" bgcolor="#CCCCCC"><b>17 June , 2008</b>&nbsp; // <b>New Rob Appearance!</b></td>
</tr>
<tr>
<td valign="top"> Rob attended the <b>Gucci Private Dinner Honoring Rihanna</b> along with other actors, such as Camilla Belle (in photo), on Saturday June 14th! <br />

<br /><center><a href="http://img120.imageshack.us/my.php?image=robcamillabellegucciparpv1.jpg" target="_blank"><img src="http://img120.imageshack.us/img120/3334/robcamillabellegucciparpv1.th.jpg" border="0" /></a></center><br /><br />We are very happy to say that Pattinson Online has an official LiveJournal community! It's called <a href="http://community.livejournal.com/rpattzdaily"><b>rpattzdaily</b></a>. It's shiny and new, but we have no doubt that it will be incredibly huge!</td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td></td>

</tr>
</table>

<map name="Map" id="Map"><area shape="rect" coords="441,25,514,40" href="http://www.robert-pattinson.co.uk/forum/" />
<area shape="rect" coords="414,40,515,51" href="http://imageshack.us/user/pattinsononline" />
<area shape="rect" coords="469,51,514,62" href="http://www.cafepress.com/pattinsononline" />
<area shape="rect" coords="434,60,513,71" href="http://community.livejournal.com/rpattzdaily/" />
</map>
<map name="Map2" id="Map2"><area shape="rect" coords="135,88,285,119" href="mailto:admin.po.net@gmail.com" />
</map></body>
</html>

The problem isn't just with this page either, it's the entire site. None of the images hosted on my site will load, even though they are definitely in the correct places! I haven't done anything different with the site or made any changes that would have caused this. I've tested it in Firefox and IE, and visitors have said they are experiencing the same trouble.

Any help would be appreciated, thanks in advance! :)

Chris
06-17-2008, 10:37 AM
I assume images on other sites work fine so it isn't a browser setting issue?

Did you perhaps configure any server settings for preventing hotlinking of images or something but then it got wonky because it thinks your own URL is not local?s

Nico
06-17-2008, 11:32 AM
If you access the site through this URL: http://robert-pattinson.co.uk/ you can see the images perfectly (URL without the www).

rpanella
06-17-2008, 12:07 PM
Yeah, and if I access the images with the www prefix, they give a 403 forbidden error, so it sounds like your site is not set up to work from www
________
Honda Rc171 (http://www.cyclechaos.com/wiki/Honda_RC171)

flyingspatulas
06-17-2008, 03:48 PM
Did you perhaps configure any server settings for preventing hotlinking of images or something but then it got wonky because it thinks your own URL is not local?s

Yeah, and if I access the images with the www prefix, they give a 403 forbidden error, so it sounds like your site is not set up to work from www
Both of those are totally possible (and probable) - I don't know how to fix them though! I never changed any settings so I'm not sure how it got that way. Any solutions?

agua
06-17-2008, 04:36 PM
Couldn't you try calling your images from relative paths rather than absolute.

At the mo you have:


<img src="http://robert-pattinson.co.uk/images/temp_1.png" width="548" height="126" border="0" />

Whereas you could use


<img src="images/temp_1.png" width="548" height="126" border="0" />

then that should work from anywhere.

As fixing your www problem... you should probably ask your host...

Or create a htaccess file to redirect (http://www.besthostratings.com/articles/force-www-htaccess.html) - which will also stop duplicate content

flyingspatulas
06-18-2008, 01:05 AM
It's fixed! There was a typo in my .htaccess file.

Thanks for all of your help! :D