Martin - could you please repost your latest code for other CLARA users .... I tried this last year on CLARA and they told me they did not accept mod rewrites
Announcement
Collapse
No announcement yet.
testing please
Collapse
X
-
Hi Jont
OK, this is what I added to the end of my .htaccess (including a blank line first to seperate from rest of the instructions in there).
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?megacitycomics\.\co\.uk/.*$ [NC]
RewriteRule \.(gif|jpg|js|css)$ - [F]
Note the .\co\.uk which I did myself by trial and error and mucho reading htaccess/apache help files (I'm a real novice at this type of stuff).
Most code was showing mysite\.com and Jo's surfwax code (at the start of this thread) shows mysite\.co.uk.
Maybe its not crucial, but the reading I did seemed to suggest you need a backslash before each period, to mean 'take as literal character', as the period is itself an apache instruction.
I had previously tried placing these lines (and variations thereof) at the start of the file, and that caused me no end of problems, by locking me out of my own site, and denying access to the whole site for everyone!
The changes had no effect (I wasted a whole afternoon trying different versions) - as Jo had said - they probably weren't allowing mod rewrites.
I emailed business support asking if they allowed mod rewrites and raised a ticket (I also tried phoning, but the helpdesk guy didn't seem to know what a mod rewrite was!).
Anyway, on testing this morning, by checking out some of my biggest hotlinkers, all the hotlink pics were no longer showing and my logs confirmed no more myspace linkers! Hurray!
Support haven't replied to my email, but I am assuming that they switched on mod rewrites for me (or whatever they do to activate it).
I shall monitor the situation over the next few days, as i am interested as anyone to see if this saves me much bandwidth, and/or loses me any business.
I did always wonder why the vast majority of my bandwidth was devoted to America, when my customer base is primarily UK, but maybe its not that simple.
Hope that helps
Martin
Comment
-
Talk about raising my hopes with the first post and then crashing me back down again with the second
Seem to recall this happened previously with CLARA whereby it was then wasn't working ... for no apparent reason.
*****
Just dug out this email from CLARA dated 18th Nov 2005
Dear John,
Unfortunately we do not have any suggestions for others to stop other customers hotlinking to you website.
Please do not hesitate to contact us if you require any further
assistance.
Kind regards,
Intakhab Raja
**************
Hopefully something will have changed on their servers since then
Comment
-
OK, for Jont and anyone else interested, Claranet eventually responded with:
"Unfortunately you are not permited to define your own rewrite rules on
Clarahost (beyond (sub)domain redirects, which you can setup in the
DMS page"
I'll chalk that one up to a few days wasted effort then, and continue letting my bandwidth usage leech away...
I assume that if I get around to taking on a managed dedicated server I can do what I like, and will be able to rewrite....although then it will be less of a need as likley to have unlimited bandwidth!!
Martin
Comment
-
John
Carried out a few 'hits back' to the worst offenders (those chalking up in excess of 300 hits pm on single pics), but nothing malicious.
I figure I can't gain anything much by temporarily killing their site with a whopper gif (though I was tempted ), but I can get some 'free' advertising by switching an image over to an ad for my site.
The problem is we have so many damn images (must be in excess of 10,000) that its a crazy task to try and keep replacing all the leeched ones.
Plus, its a lot of effort to track down the myspacers (who combined are notching up in excess of 20,000 image hits to my site pm!!), as the link via the stats page dosen't take you direct to the offender - you need to fish through the logs, which is a silly waste of time (yup, I did it for 2 days, and its both silly and a waste of time !!!).
One thing I really should do is clear off unused images from the server, as I did find images that we no longer need.
The products we sell change fairly often, so the server is littered with unused images for products we no longer sell, yet still have legacy hotlinks to them.
Am I correct in thinking that its simple to just delete all of the jpgs from my server space, then perform a site refresh, or am I overlooking something, and is there any danger to this that you can highlight, before I go ahead?
Martin (fighting a losing battle against the dark forces of myspace et al)
Comment
-
Thanks Duncan & Jo
Haven't got the purge and whatsit facility on the live site, as that is currently on Act5 (site rebuilding with Bus7, but not yet switched over).
Will follow your advice Jo.
From what you are saying, am I correct in thinking then after I have deleted the images, the software will pick up which images are missing and still needed, by looking at whats phyically on the server, rather than looking at the local database for a 'picture already uploaded' flag?
thanks again
Martin
Comment
-
Would it help if images are named differently - i.e. an image named captainfantastic.gif, could be called cptfan.gif. It might stop people who are googling for images as opposed to a regular search.
(Don't shoot me down for a non-techie suggestion!)
NickTrying to squeeze my moneys worth out of V7 - but not for much longer!
Comment
-
(Don't shoot me down for a non-techie suggestion!)
Disallow: /*.gif$
Disallow: /*.jpg$
it won't prevent the issue we are talking about which is preventing people from using your images, but it is another step to make it a little bit more difficult
Comment
Comment