redirect images

Josh

Uber No0b
Messages
394
Reaction score
0
Points
0
I'm running low on bandwidth and im getting an unmetered server, I'm going to put all the images on it, but currently a lot of people are hotlinking my files (which I want), but is there a way to redirect all images, for instance coolsite.com/images/asdf/1.jpg to coolsite2.com/images/asdf/1.jpg? So if someone's hotlinking my image they're actually hotlinking coolsite2 and using it's bandwidth?

Im thinking this can be done with htaccess
 
Last edited:

Brandon

Former Senior Account Rep
Community Support
Messages
19,181
Reaction score
28
Points
48
Josh said:
I'm running low on bandwidth and im getting an unmetered server, I'm going to put all the images on it, but currently a lot of people are hotlinking my files (which I want), but is there a way to redirect all images, for instance coolsite.com/images/asdf/1.jpg to coolsite2.com/images/asdf/1.jpg? So if someone's hotlinking my image they're actually hotlinking coolsite2 and using it's bandwidth?

Im thinking this can be done with htaccess

Id say just take coolsite.com on that server and be done with it. The optherway it to make .jpg a php handler and to then redirect it to the new image location.
 

Josh

Uber No0b
Messages
394
Reaction score
0
Points
0
coolsite.com uses a lot of resources, and the unmetered server is a crappy celeron, so it wouldn't survive if i did that

also i have no idea what you mean by php handler
 
Last edited:

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
I think what he meant with coolsite.com is move coolsite.com to the server coolsite2's on, then fix the dns records or whatever they're called for coolsite.com to look at the coolsite2.com server.

And by php handler, I think he means make a php script that loads in place of all jpg's, and redirects all requests for the images to coolsite2. I'm probably highly mistaken, but I think you might be able to pull this off with a .htaccess file (I got one set up for my userbars on my site, it doesn't let you load the image directly, but if you go through the php script it'll load). Try looking for a .htaccess tutorial and see what you can find :)
 

Corey

I Break Things
Staff member
Messages
34,553
Reaction score
204
Points
63
Use mod_rewrite with the .htaccess

-Corey
 
Top