Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 23, 2012, 09:53:49 AM

Pages: [1]   Go Down
  Print  
Author Topic: Strange hotlink/graphics issue?  (Read 1127 times)
Toon_Dawg
Spaceship Captain
*****
Offline Offline

Posts: 105



WWW
« on: July 25, 2003, 11:27:57 AM »

I am not sure if this is the way I have coded my HTML pages, but after turning on hotlinking, when I access my websites (and subdomains) *without* an ending backslash, the graphics don't show up (red x).  However, if I put a backslash after the domain, they show up fine.

ex:  http://www.dawgtoons.com

vs

http://www.dawgtoons.com/

Any ideas?
Logged

Coon
Adi
Über Jedi
*****
Offline Offline

Posts: 2549



WWW
« Reply #1 on: July 25, 2003, 02:44:55 PM »

The images seem to work just fine for me whether I use the backslash or not.
Logged

Soccer Forum - Established freestyle soccer forum!
Freestyle Football - Cool soccer freestyle videos! Must SEE!
Frisco Painting - Faux painting for Dallas, TX area.
Toon_Dawg
Spaceship Captain
*****
Offline Offline

Posts: 105



WWW
« Reply #2 on: July 26, 2003, 11:30:26 AM »

Quote from: Coon
The images seem to work just fine for me whether I use the backslash or not.


Hmm, my home domain works, try a subdomain:

http://endies.dawgtoons.com

vs

http://endies.dawgtoons.com/
Logged

Coon
Adi
Über Jedi
*****
Offline Offline

Posts: 2549



WWW
« Reply #3 on: July 26, 2003, 11:36:09 AM »

Same with those... I see them all. Is anyone else seeing them?
Logged

Soccer Forum - Established freestyle soccer forum!
Freestyle Football - Cool soccer freestyle videos! Must SEE!
Frisco Painting - Faux painting for Dallas, TX area.
TWebMan
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3112



WWW
« Reply #4 on: July 26, 2003, 11:37:17 AM »

See them all fine.  Thing is if there's no slash at the end my browser puts it in.  Doesn't everybody's do this?
Logged

"Computers cause people to make more mistakes than any other invention in history, with the possible exception of handguns and tequila."  - Unknown
"Liberty of any kind is seldom lost all at once." - D. Hume
Every day is an Ode to Joy
The planet will be fine... and so will your site
KJones
Galactic Royalty
*****
Offline Offline

Posts: 327



WWW
« Reply #5 on: July 26, 2003, 11:50:35 AM »

It's happening for me when I visit his site. I'm using IE 6.

If you go to his site using the links in this forum it automatically adds the slash. Go to the site, remove the / and hit enter, and then click refresh... the pictures will disappear.

Are the pictures stored in the same directory and the html file? If they are stored in a different directory then it might be an addressing problem related to the way subdomains work... but I'm not sure.


Kel
Logged

"I believe that this nation should commit itself to achieving the goal, before this decade is out, of landing a man on the moon and returning him safely to the earth." - John F. Kennedy

Toon_Dawg
Spaceship Captain
*****
Offline Offline

Posts: 105



WWW
« Reply #6 on: July 26, 2003, 11:53:10 AM »

Quote from: LunarOrbit
It's happening for me when I visit his site. I'm using IE 6.


Yes, it seems to be an IE 6.0 thing - I just tested it with Opera and it automatically adds the ending slash.  BTW, I'm a she.   Very Happy
Logged

TWebMan
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3112



WWW
« Reply #7 on: July 26, 2003, 11:55:17 AM »

Yeah I can get it to happen.  What's in your allowed hosts for the hotliinking?
Logged

"Computers cause people to make more mistakes than any other invention in history, with the possible exception of handguns and tequila."  - Unknown
"Liberty of any kind is seldom lost all at once." - D. Hume
Every day is an Ode to Joy
The planet will be fine... and so will your site
KJones
Galactic Royalty
*****
Offline Offline

Posts: 327



WWW
« Reply #8 on: July 26, 2003, 11:56:13 AM »

Sorry. Smile

The same thing happens to me all the time, only in reverse. My name is Kelly so people assume I'm a she but I'm really a he.
Logged

"I believe that this nation should commit itself to achieving the goal, before this decade is out, of landing a man on the moon and returning him safely to the earth." - John F. Kennedy

Toon_Dawg
Spaceship Captain
*****
Offline Offline

Posts: 105



WWW
..
« Reply #9 on: July 26, 2003, 12:00:03 PM »

Quote from: TWebMan
Yeah I can get it to happen.  What's in your allowed hosts for the hotliinking?


Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://antiorange.dawgtoons.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://dawgtoons.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://endies.dawgtoons.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://ninjawga.dawgtoons.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://talesfrombandcamp.dawgtoons.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://tikaboopeak.dawgtoons.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.dawgtoons.com/.*$      [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmpjpg|jpeg|gif|png|bmp)$ http://www.dawgtoons.com [R,NC]



I've had this happen on two different hosts.

Some of the graphics are in a subdirectory, and some are not (same directory as index file).
Logged

Boris
Master Jedi
*****
Offline Offline

Posts: 1082



WWW
« Reply #10 on: July 28, 2003, 10:27:40 PM »

Works fine on :

Netscape 7
Firebird
Opera.

that's because they all add the slash at the end wether you put it or not.

IE doesnt, that's why you have something wrong going on.

I have no idea how the hotlinking in the .htaccess works so i'll shut up on that one.
Logged

Questions on graphics? Visit the lunarpages Graphics forum!

Bugging Danielle daily since 2003.

Have a Lunar Day!
Hush
Senior Moderator
Über Jedi
*****
Offline Offline

Posts: 2905


« Reply #11 on: November 12, 2003, 12:04:46 AM »

If you feel comfortable editing the .htaccess file (remember to make a backup before making ANY changes), here is the code structure to add in for hotlink protection.

Quote

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com(/)?.*$     [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?domain.com/index.htm(/)?.*$     [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ - [F,NC]


the /index.htm will need the extention corrected for asp, php ext.  and obviously if you have mixtures of index pages, include the various ones.  This code structure should also prevent the problem which occurs on index pages where a user types the domain name without the trailing / mark.

Hope this helps Gleam
Logged

<- From the ashes will rise a phoenix ->

Lunarpages Web Hosting || Lunarpages Forums || Lunarpages Affiliate Program
Phantom
Space Explorer
***
Offline Offline

Posts: 7


« Reply #12 on: November 19, 2003, 03:07:55 PM »

I am having the same problem on my site...

www.killerslimited.com

www.killerslimited.com/

Quote from: Hush
If you feel comfortable editing the .htaccess file (remember to make a backup before making ANY changes), here is the code structure to add in for hotlink protection.


What is this file and where can I find it?
Logged
leighsww
* The Tough Love Cuddly One *
Berserker Poster
*****
Offline Offline

Posts: 13870


WWW
« Reply #13 on: November 19, 2003, 07:04:50 PM »

You can find it ...

1) In cPanel, click on File Manager
2) Click on the folder icon of the public_html
3) Click on the filename of the .htaccess file
4) On the upper right corner of your screen, click on Edit file

You then will want to make a backup copy, so copy and paste the data into Notepad (take Word Wrap off).

Save the file as "htaccess.txt" (without the dot prefix) to your computer (it's just a backup so it doesn't need to be named exact.  You will just use it to copy the data back into your .htaccess file if needed).

5) Put the line of coding that HUSH gave above (with your domain name changes) and SAVE.

*edited - Since you are already using Hotlinks Protection, make sure that you "add" the coding to the other coding that's already there, otherwise, it will mess up your allow URLs.

It works GREAT!
Logged
Phantom
Space Explorer
***
Offline Offline

Posts: 7


« Reply #14 on: November 19, 2003, 10:39:06 PM »

Great!!!  Very Happy Thanks for the help.This has taken care of my problem.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: