?
Solved

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

Posted on 2011-10-10
5
Medium Priority
?
259 Views
Last Modified: 2014-01-27
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?
0
Comment
Question by:jrm213jrm213
3 Comments
 
LVL 84

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 1000 total points
ID: 36952709
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.
0
 
LVL 9

Accepted Solution

by:
fcontrepois earned 1000 total points
ID: 36953730
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]
0
 
LVL 17

Author Comment

by:jrm213jrm213
ID: 37033298
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.
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ransomware, the malware that locks down its victim’s files until they pay up, has always been a frustrating issue to deal with. However, a recent mobile ransomware will make the issue a little more personal… by sharing the victim’s mobile browsing h…
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question