Jump to content

Recommended Posts

Posted

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?

Posted

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" />

Posted

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?

Posted (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 by TCH-Don
Posted

Hotlinks protection was in fact turned on. I have added the subdomain to the allow list, and "all is well." :D

 

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.

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...