Forum Moderators: open

Message Too Old, No Replies

Writing the path for images within a subdomain

         

wolfslayer

1:50 am on Apr 13, 2003 (gmt 0)



I have a complet hosted website.. I own the www.domain.com, it gives me the ability to create subdomains, i did, now i have www.subdomain.domain.com , the subdomain folder resides in the public_html folder..

Inside that subdomain folder is a cgi folder. So..in the subdomain folder..i added my index.html and several other webpages.. The nessasary images..and went to check it out.. The website loads up just fine...pages all work...links on pages to other pages of the same subdomain in the same subdomain folder all work wonderfully!

Not..the images however...

For 5 days ive rewritten the links to the images 10,000 different ways...ive spattered the images all over the entire main domain and ive even created an images folder inside the subdomain folder.. And tried to link the images to there..nothing works! Arrrrrrgggghhhhh....

all i get..is the stupid little clear box with red x where my image should be on webpage. Can anyone help? Thanks,ws..

(my images are jpg's )

[edited by: tedster at 2:46 am (utc) on April 13, 2003]
[edit reason] change from all caps [/edit]

john316

2:03 am on Apr 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried :

YOURSUBDOMAIN.YOURDOMAIN.COM/IMAGES/ONEOFYOURIMAGES.JPG

To SEE if any images can be called DIRECTLY?

wolfslayer

2:07 am on Apr 13, 2003 (gmt 0)



yes..about 50 times...

john316

2:11 am on Apr 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you have an .htaccess file in your main site root folder that blocks other domains from hotlinking to images?

wolfslayer

2:13 am on Apr 13, 2003 (gmt 0)



i have antihotlinking activated!

john316

2:18 am on Apr 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



De activate the hotlinking part of htaccess (just put a # in front of the line) and call your subdomain without the "www"

just [subdomain.domain...]

[edited by: john316 at 2:19 am (utc) on April 13, 2003]

wolfslayer

2:19 am on Apr 13, 2003 (gmt 0)



in the public_html folder..there are 2 hta access files..
one has a large number at the end of it..

john316

2:24 am on Apr 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



RewriteEngine on
RewriteCond %{HTTP_REFERER}!^$
RewriteCond %{HTTP_REFERER}!^http://123.12.123.1.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://mysite.com.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.mysite.com.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://myste.com.*$ [NC]
RewriteCond %{HTTP_REFERER}!^http://www.mysite.com.*$ [NC]
RewriteRule .*\.(gif¦jpg¦jpeg¦bmp¦asx¦mpeg¦mpg¦avi¦wmv)$ [anyothersiteiwant.com...] [R,NC]

Look for this bit in your htaccess and add :

RewriteCond %{HTTP_REFERER}!^http://yoursubdomain.yoursite.com.*$ [NC]

Stick that line in the middle.