• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • Last Modified:

Stop other websites from Hotlinking images, will this affect my Android App?

I have a website and an android app. The android app displays pictures from the website. I want to stop other people from hotlinking my images (which they are currently doing) but I am unsure if it will make my android app stop working.

It seems that most solutions use .htaccess to stop image hot linking, and I have done this in the past but I am worried that my android app will stop working if I implement this. What is the referer from an android appliaction? Has anyone done something similar?
2 Solutions
David Johnson, CD, MVPOwnerCommented:
it depends upon HOW you coded the android app.. it probably will work just fine.. and the referrer is probably the link on your site and not a direct link to the image (some programs allow you to modify the referrer
as a test just modify your htaccess so it only affects a small subset of the pictures (you can create a test folder and add a few images there as a test) and see what the results are. That way you know for sure.
Frank ContrepoisVP Technical SalesCommented:
you can use the .htaccess with rewrite checking the OS send in the http header. It's not an ideal solution but at least limit the hotlinking

something like this

RewriteCond %{HTTP_USER_AGENT} ^.*(Android).*$ [NC]
RewriteRule ^(.+)$ /images-android/$1 [L]
jrm213jrm213Author Commented:
I apologize, I have not had time to work on this yet. It isn't a priority here but it is something we want to figure out, so hopefully I will have time to work on this soon.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now