crmamx Posted November 17, 2012 Share Posted November 17, 2012 (edited) Trying to link to an image, b1.png, has got me befuddled. Here is my directory.The image is in all 3 files. public_html 1. content a. pages 2. Pictures_Other This works: http://southalabamar...es_Other/b1.png These get a 404 not found error and I can't figure out why. http://southalabamar.../content/b1.png http://southalabamar...nt/pages/b1.png Edited November 17, 2012 by crmamx Quote Link to comment https://forums.phpfreaks.com/topic/270843-cant-linki-to-an-image/ Share on other sites More sharing options...
codefossa Posted November 17, 2012 Share Posted November 17, 2012 I don't know what you expect us to do with this. You gave like no information. Do you have the direct links to the image files? Is there an .htaccess preventing it from directing to the file? Is your server configured to use the directories you're trying to use? Quote Link to comment https://forums.phpfreaks.com/topic/270843-cant-linki-to-an-image/#findComment-1393292 Share on other sites More sharing options...
Pikachu2000 Posted November 17, 2012 Share Posted November 17, 2012 Are you saying the image file is all three directories, or you're calling it from html files that are in all three directories and only one of them works? Quote Link to comment https://forums.phpfreaks.com/topic/270843-cant-linki-to-an-image/#findComment-1393295 Share on other sites More sharing options...
crmamx Posted November 18, 2012 Author Share Posted November 18, 2012 (edited) Are you saying the image file is all three directories, or you're calling it from html files that are in all three directories and only one of them works? Hi Pikachu, really nice to see you again. I am doing another model airplane site and guess what? I am using the code that you, giz and freakie spent so many hours with me on. This one just gets me. I am trying to call an image from a program with this statement and it works. <a href="http://southalabamarc.com/Pictures_Other/b1.png"> Pictures_Other and content are files in the root directory. pages Is a file in content I tried showing these in a diagram but couldn’t figure out how to do it in the post. There is an image b1.png located in all three files. Neither one of these statements will work: <a href="http://southalabamarc.com/content/b1.png"> <a href="http://southalabamarc.com/content/pages/b1.png"> What I am trying to say is in the statement that works I simply change Pictures_Other to content or content/pages and it will not work. Edited November 18, 2012 by crmamx Quote Link to comment https://forums.phpfreaks.com/topic/270843-cant-linki-to-an-image/#findComment-1393312 Share on other sites More sharing options...
Pikachu2000 Posted November 18, 2012 Share Posted November 18, 2012 (edited) That's what I'd expect to happen. The image file only exists in the one location so the path to it should always be the same, regardless of the location of the html file. <a href="http://southalabamarc.com/Pictures_Other/b1.png"> would be correct to use anywhere. Edited November 18, 2012 by Pikachu2000 Quote Link to comment https://forums.phpfreaks.com/topic/270843-cant-linki-to-an-image/#findComment-1393314 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.