Forum Moderators: phranque

Message Too Old, No Replies

how do you even know is someone is hotlinking?

does it show in your referers? or logs?

         

proxyHunter

6:05 am on Nov 22, 2003 (gmt 0)

10+ Year Member



how do you even know is someone is hotlinking your images or doing this?

<img src=http://www.mydomain.com>

does it show in your referers ? or logs? that is their domain doing the hotlinking?

jdMorgan

6:40 am on Nov 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, you'll see that the referer is a page outside your site. Or you may simply see requests for your images without any requests for your pages -- and no referer. This latter case is the worst, since all you can find out is the user's IP, and not the site that is doing the hotlinking.

Jim

keyplyr

7:50 am on Nov 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



proxyHunter, I use a free website statistics program called www.analog.cx that uses your site's raw access logs and runs on your local machine to display your sites activity. It is customizable to show many things, including referrers. I typically config referrers to have 2 columns, one for requests and one for page views. By doing this, it is obvious when files other than pages are requested, and it displays the clickable referrer.

So... when I see 12 hits from h*tp://example.com but 0 page views, I know the hits were image files, or possibly they're linking to one of my scripts. Then I can follow the link to investigate.

operafan

7:56 am on Nov 22, 2003 (gmt 0)

10+ Year Member



Sorry to be slightly off topic but where should my rewrite statements be placed in the httpd.conf file.

I've currently placed it under the
Servername ww.abc.com
RewriteEngine on
rewritecond ...

but it doesnt work, although the site is still running.
I've tried the same rules in .htaccess & it works.

Only for 1 site on the server/

Thanks

closed

2:59 am on Nov 24, 2003 (gmt 0)

10+ Year Member



Try putting your rewrite rules right before Section 3: Virtual Hosts.

Also remember that in .htaccess, the path that's used in patterns does not begin with a slash, but in httpd.conf, it does.

jdMorgan

5:24 am on Nov 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Good point... But, it's even worse than that!

... in .htaccess, the path that's used in RewriteRule patterns does not begin with a slash, but in httpd.conf, it does.

Just to make it as confusing as possible, the patterns for RewriteCond %{REQUEST_URI} are the same between .htaccess and httpd.conf (both patterns will start with a slash), but the patterns for RewriteRule differ.

Jim

operafan

6:43 am on Nov 24, 2003 (gmt 0)

10+ Year Member



Sorry guys I've yet to try it out in the httpd.conf as suggested - still reading up on regex(links recommended by Jim).
I'm playing around & have no idea, why my rewritecond is not followed
ex:
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} opera [NC]
RewriteRule ^$p\.html /p2.html [L]

The rewriterule works, but when I tried it on other browsers it also follows the same rewriterule?

closed

7:03 am on Nov 24, 2003 (gmt 0)

10+ Year Member



I doubt that the substitution actually occurs, because I just tried using your pattern with no success. Maybe you should try removing the $?

jdMorgan

7:07 am on Nov 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



definitely...

RewriteRule ^p\.html$ /p2.html [L]

operafan

7:42 am on Nov 24, 2003 (gmt 0)

10+ Year Member



Ok it works great with me using opera switching between agents. But when I try it on IE, it also follow the same rule?
Another 1 last question, how do I put multiple rewriterule

lets say, I have the first example p.html to p2.html & then another p3.html to p4.html
how do I combine them?

victor

7:47 am on Nov 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My stats package reports this sort of thing as sponging. Check if yours does too.

operafan

7:51 am on Nov 24, 2003 (gmt 0)

10+ Year Member



I don't get you Victor, sponging - did a search have no info of it with regards to hosting or server of sort.
I've also tested it locally & results are the same?

jdMorgan

7:58 am on Nov 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First of all, flush all of your browser caches before you re-test this kind of stuff. .htaccess can only affect requests from your server, and if a page is cached in your browser, the server will never even see the request. There is no reason that IE should be affected by this rule if you're using the RewriteCond you posted.

For info on multiple RewriteRules under one RewriteCond, see the [C] chain flag for RewriteRule.

If the old and new filenames have some relationship or pattern to them like Old1->New1 and Old2->New2, etc., then use backreferences to rewrite all of them with a single RewriteRule, e.g.

RewriteRule ^Old(.*) /New$1

Another thing you need to know is that HTTP_USER_AGENT will be unreliable to detect Opera. Opera can 'spoof' as Internet Explorer. I'm not sure if it's still true, but older versions used to spoof as Explorer by default(!) - right out of the box(!). So, detecting Opera may only work for 'power users' who have configured it to identify itself properly as Opera, and not as IE. And this browser setting affects only the referrer sent by Opera, it does not affect how Opera works or how it renders HTML or interprets client-side scripting.

Some related discussion going on right now: [webmasterworld.com...] - See the potentially-useful JavaScript Opera detection tip.

Jim

victor

8:10 am on Nov 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Operafan: maybe the term is specific to MatrixStats. But is is a useful thing to get reported:

Random reference:

"The Spongers report details referrals from external pages to non-page files on the site. Entries in this report are likely to be caused by other sites sponging graphics or downloads from the site."

[asp-host.co.uk...]

jdMorgan

8:11 am on Nov 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sounds like spongers = hot-linkers

operafan

8:18 am on Nov 24, 2003 (gmt 0)

10+ Year Member



Yes, thank you Jim for the flushing of cache. It must have been that, because theoretically the Rewrite strings are corrrect.
So much to learn on this. I wish there was a port for me to download into my brain :)

No more questions, back to reading again...man how long did it take you to sort of " master " it :)
Answering these questions in the forum must be a good practice for you to keep you sharp :)

So will Ralf S. Engelschall ever win the Noble Technology Price? But is there a Noble Technology Price?