Welcome Guest, Not a member yet? Register   Sign In
Avoid direct-linking to images
#7

[eluser]veledrom[/eluser]
I can still hot-link to the images with these modified htaccess files:

Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?:
RewriteRule \.(jpg|jpeg|png|gif)$ http://codeigniter.com/images/design/ci_logo2.gif [NC,R,L]
RewriteCond $1 !^(index\.php|web|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?thisismysite\.co.uk/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ http://codeigniter.com/images/design/ci_logo2.gif [L]
RewriteCond $1 !^(index\.php|web|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Please help.

My CI folder structure:

Code:
.htaccess
index.php
license.txt
application
system
web
  - images
    - all the images are here
  - css
  - js
  - index.html


Messages In This Thread
Avoid direct-linking to images - by El Forum - 05-24-2012, 06:17 AM
Avoid direct-linking to images - by El Forum - 05-24-2012, 06:46 AM
Avoid direct-linking to images - by El Forum - 05-24-2012, 01:41 PM
Avoid direct-linking to images - by El Forum - 05-26-2012, 12:08 PM
Avoid direct-linking to images - by El Forum - 05-26-2012, 12:46 PM
Avoid direct-linking to images - by El Forum - 05-27-2012, 01:51 AM
Avoid direct-linking to images - by El Forum - 05-28-2012, 08:10 AM
Avoid direct-linking to images - by El Forum - 05-30-2012, 01:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB