0

In one of the sites I have created, I am using a specific made up 404 page instead of the default one that comes with the server. This 404 page contains an image, and then a block containing text next to it. I then made the url alias for this page "404." Now when I go into the configurations, and set 404 as the 404 error page, it automatically saves it as "node/4." The problem then arises when you go to a page that doesn't exist. If the page is something like www.yrambam.org/nonexistentpage then there is no problem. The page works. But if the page is something like www.yrambam.org/something/nonexistentpage then the page displays without the image, and the formatting of the page becomes all messed up. I am wondering why this happens, and if there is a way to fix it.

  • have you checked the actual html of the page. is the image gone or just not being found? the reason I ask is it sounds like it is a path issue, eg, the image is being served relatively, eg, "path/to/image/image.jpg" not "/path/to/image/image.jpg" – Jimajamma Jan 11 '12 at 17:47
  • I looked at the html of the page by viewing the source, and in that, the img is actually not even in the html, but it is there when the page is /something instead of /something/something. in fact, the image even disappears when the page is /something/ instead of just /something – Ephraim Jan 11 '12 at 18:04
1

This is definitely an error where the HTML of the 404 page is referencing the image via a relative path rather than an absolute path.

Screenshot of the page + source

Change the HTML of the page to use the image source path '/sites/default/files/pictures/404-error.png'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.