Pocketman38 Posted December 14, 2004 Share Posted December 14, 2004 I have seen a few related posts relative to this subject, yet I still do not understand how to get a page in a subdomain to find images. For that matter, I assume links will be an issue as well. cook.inssar.org was created with cPanel http://cook.inssar.org/index.htm has images which are not displayed I have tried putting the images in the root cook folder <IMG SRC="image01.gif"> I have tried putting them in a folder cook/objects <IMG SRC="objects/image01.gif"> I have tried accessing images in the main domain's objects folder. <IMG SRC="../objects/image01.gif"> AND <IMG SRC="http://www.inssar.org/html_public/objects/ind_flag.gif"> I assume there is a simple explanation. Suggestions please? Quote Link to comment Share on other sites More sharing options...
TCH-Dick Posted December 14, 2004 Share Posted December 14, 2004 If its stored in the same directory(cook) it would be ><img src="images/myimage.jpg" /> If its outside of the directory(public_html) it would be ><img src="http://www.domain.com/images/myimage.jpg" /> or ><img src="/home/public_html/username/images/myimage.jpg" /> Quote Link to comment Share on other sites More sharing options...
TCH-Thomas Posted December 14, 2004 Share Posted December 14, 2004 Welcome to your extended family Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted December 14, 2004 Share Posted December 14, 2004 Welcome to the family. Quote Link to comment Share on other sites More sharing options...
TCH-Don Posted December 14, 2004 Share Posted December 14, 2004 Welcome to the Family and your new home! We really are like family here. So if you need anything, just ask your new family! We love to help Quote Link to comment Share on other sites More sharing options...
TCH-Rob Posted December 14, 2004 Share Posted December 14, 2004 Pocketman, Welcome to the forums and welcome home. Quote Link to comment Share on other sites More sharing options...
Pocketman38 Posted December 14, 2004 Author Share Posted December 14, 2004 Gentlemen: I have tried all the suggestions in Dick's reply and, still nothing. <img src="/home/public_html/cook/objects/const.gif"> <img src="http://www.inssar.org/objects/const.gif"> <img src="/home/public_html/cook/objects/ind_flag.gif"> <img src="/home/public_html/objects/ind_flag.gif"> <img src "objects/ind_flag.gif"> <img src "../objects/ind_flag.gif"> I have all the images in both objects folders, and the cook.inssar.org root folder. I dropped the subdomain and recreated. Still no success. I noticed in Don's examples, "/" at the end of the tag <img src="images/myimage.jpg" /> I even tried that. Any other suggestions? Quote Link to comment Share on other sites More sharing options...
TCH-Don Posted December 14, 2004 Share Posted December 14, 2004 (edited) Where are the images? in the same folder that represents the subdomain? remember the subdomain is a shortcut to domain/folder If in the same folder as your pages <img src="myimage.jpg" /> will work other wise the absolute url <img src="http://www.domain.com/foldername/myimage.jpg" /> will also work. edit------- I see you are using relative addressing <img src="../objects/ind_flag.gif"> try the absolute address <img src="http://www.inssar.org/objects/ind_flag.gif"> when using in a subdomain Edited December 14, 2004 by TCH-Don Quote Link to comment Share on other sites More sharing options...
KungFòóFairy Posted December 14, 2004 Share Posted December 14, 2004 This should work: ><img src="http://cook.inssar.org/objects/ind_flag.gif" /> but doesn't because it gives a 404 error while trying to find the missing 403 error page. So, you need to add that subdomain (http://cook.inssar.org/ and http://www.cook.inssar.org/) to your allowed sites in hotlink protection. Quote Link to comment Share on other sites More sharing options...
Pocketman38 Posted December 14, 2004 Author Share Posted December 14, 2004 Don, All good suggestions, but nothing works. Properties (right click on image spot) says: http://cook.inssar.org/objects/const.gif Absolute path says: http://www.inssar.org/objects/const.gif I have even set up a second subdomain indy.inssar.org and get the same results. I appreciate your efforts, but sadly, nothing works Quote Link to comment Share on other sites More sharing options...
TCH-Bruce Posted December 14, 2004 Share Posted December 14, 2004 You don't have permission to access /objects/const.gif on this server. Sounds like a permissions problem to me. Quote Link to comment Share on other sites More sharing options...
TCH-Don Posted December 14, 2004 Share Posted December 14, 2004 Are you using hotlinking protection? as KungFòóFairy mentioned, if you are you need to add both the http://subdomain.domain and the http://www.subdomain.domain Quote Link to comment Share on other sites More sharing options...
Pocketman38 Posted December 14, 2004 Author Share Posted December 14, 2004 Hotlinks protection was in fact turned on. I have added the subdomain to the allow list, and "all is well." Prior to changing the hotlinks allow access list, I created a test subdomain on another website, copied the images and html, and it worked, even though the newly created subdomain was (is) not on the allow list ? I still do not know why one site behaved differently than the other, but it's all working now and I've learned from the experience. Thank you all for your perseverance. Quote Link to comment Share on other sites More sharing options...
TCH-Don Posted December 14, 2004 Share Posted December 14, 2004 cpanels hot link protection is ify at best I ended up not using it, since every few months it stopped my own site form using images. Every time you do something in cpanel that modifies your .htacces file I wonder if that can mess up the hotlink part. Quote Link to comment Share on other sites More sharing options...
KungFòóFairy Posted December 14, 2004 Share Posted December 14, 2004 Yes, it's best to learn what those apache directives do and then edit .htaccess by hand. Quote Link to comment Share on other sites More sharing options...
bellringr Posted December 14, 2004 Share Posted December 14, 2004 I never touched my .htaccess file and out of the blue my images stopped showing up when hotlinking was turned on. Iffy at best is right. Quote Link to comment 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.