Forum Moderators: phranque

Message Too Old, No Replies

ModRewrite blocking Flash access

Rewrite meant to stop hotlinking also blocks flash's access to it

         

elihorn

3:04 am on May 14, 2009 (gmt 0)

10+ Year Member



Hi there,
I don't know a hell of a lot about rewrites, but a client recently had their host add a rewrite to block image hotlinking, but for some reason it is also blocking their flash website from accessing those images. There are conditionals to allow access from their own server, so I'm unsure as to why this is happening.

More details:
Flash is accessing the image through URLRequest
The rewrite looks like this:
RewriteRule .*\.(jpg¦jpeg¦gif¦png¦bmp)$ - [F,NC]

Not sure what else you may need to know, but any help would be great

Thanks!

Samizdata

5:18 am on May 14, 2009 (gmt 0)

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



Flash is accessing the image through URLRequest

You might try using loadMovie or loadVariables instead.

I suspect, however, that the conditions added by the host may be at fault.

...

elihorn

6:30 am on May 14, 2009 (gmt 0)

10+ Year Member



Hmmmm . . . as far as I know using a Loader with URLRequest is the only way to load things in in AS3 . . . not certain, but I will look it up again.

I also think the conditions must be the problem. I will try contacting the host to see if they can fix it.

Thanks!

jdMorgan

2:07 pm on May 14, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



We need to see the conditions.

The most common error is that no provision was made to *allow* requests with blank HTTP Referer request headers. Many if not most media players and plug-ins do not send the HTTP Referer header, and if the Referer is being checked against a whitelist and that whitelist does not include a blank value, then the request will be denied.

Allowing blank referers constitutes a 'hole' in the anti-hotlinking scheme, since it will allow direct type-ins and bookmark access to the media files' URLs. However, since many media players and plug-ins don't send a referer, since many ISPs' use caching proxies in their networks which won't send a referer (e.g. AOL and EarthLink), and since many "Internet Security" software packages block the HTTP Referer header (often by default and without the user's knowledge), we really don't have a choice.

Jim