WebFaction
Community site: login faq

I tried a hundred code snippets without luck. I want to prevent hotlinking to one of my sites. This is the site where I test, if hotlinking is still possible: 93http://altlab.com/hotlinkchecker.php93 This is the link I use for testing: http://www.msc-promotion.de/media/SliderImages/motsi_2.jpg This is my httpd.conf:

ServerRoot "/home/mscpromo/webapps/django/apache2"

LoadModule dir_module        modules/mod_dir.so
LoadModule env_module        modules/mod_env.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module       modules/mod_mime.so
LoadModule rewrite_module    modules/mod_rewrite.so
LoadModule setenvif_module   modules/mod_setenvif.so
LoadModule wsgi_module       modules/mod_wsgi.so
LoadModule alias_module      modules/mod_alias.so
LoadModule authz_host_module modules/mod_authz_host.so

LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog /home/mscpromo/logs/user/access_django.log combined
ErrorLog /home/mscpromo/logs/user/error_django.log
KeepAlive Off
Listen 57712
MaxSpareThreads 3
MinSpareThreads 1
ServerLimit 1
SetEnvIf X-Forwarded-SSL on HTTPS=1
ThreadsPerChild 5
WSGIDaemonProcess django processes=5 python-path=/home/mscpromo/webapps/django:/home/mscpromo/webapps/django/lib/python2.7 threads=1
WSGIPythonPath /home/mscpromo/webapps/django:/home/mscpromo/webapps/django/lib/python2.7
WSGIScriptAlias / /home/mscpromo/webapps/django/myproject.wsgi

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !www.msc-promotion.de [NC]
RewriteRule \.(gif|jpg|png)$ - [F,NC]

What am I doing wrong?

asked 11 Oct '11, 22:12

mbrochh
861510
accept rate: 16%

edited 11 Oct '11, 22:12

Hi,

Are you sure the /media URL path for your app is handled by your django app or you have created a static/cgi/php or static-only app for it?

If its static-only, please convert it to Static/CGI/PHP and if its Static/CGI/PHP you should put the redirect rules in the .htaccess there, not in the httpd.conf of django.

(11 Oct '11, 22:18) neeravk
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×225
×28
×1

question asked: 11 Oct '11, 22:12

question was seen: 3,556 times

last updated: 11 Oct '11, 22:18

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM