chiefbutz
04-03-2005, 12:58 AM
OK i want to make it so that when an image is hot linked it showes a different image. I ahve the code that SHOULD do that. It does that, but i have the code in there that should allow direct linking (viewing it form the browser). The viewign formthe browser part doesn't work! Here is my .htaccess file:
<Files ~ "^\.ht">
order allow,deny
deny from all
satisfy all
</Files>
Options -Indexes
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://megars.illusionfxnet.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://megars.illusionfxnet.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.megars.illusionfxnet.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.megars.illusionfxnet.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://img220.exs.cx/img220/1497/x1ul.jpg [R,NC]
This does not allow the the viewing of .htaccess or .ht* files
<Files ~ "^\.ht">
order allow,deny
deny from all
satisfy all
</Files>
This disables indexes
Options -Indexes
This is the hotlinkign part
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://megars.illusionfxnet.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://megars.illusionfxnet.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.megars.illusionfxnet.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.megars.illusionfxnet.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://img220.exs.cx/img220/1497/x1ul.jpg [R,NC]
The first line i knows make sit so you can disabel the hotlinking
The next line is what SHOULD allow things that are directly linked
The next 4 lines say that my site is ok for images to be shown
the next line says that anythign with the extension i specify is not shown
well the part for direct linking doesn't work!
I also want to learn all the thing you can do in the htaccess file and how, so i can write a generator. The thing Cpanel has isn't exactly that good...
<Files ~ "^\.ht">
order allow,deny
deny from all
satisfy all
</Files>
Options -Indexes
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://megars.illusionfxnet.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://megars.illusionfxnet.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.megars.illusionfxnet.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.megars.illusionfxnet.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://img220.exs.cx/img220/1497/x1ul.jpg [R,NC]
This does not allow the the viewing of .htaccess or .ht* files
<Files ~ "^\.ht">
order allow,deny
deny from all
satisfy all
</Files>
This disables indexes
Options -Indexes
This is the hotlinkign part
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://megars.illusionfxnet.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://megars.illusionfxnet.com$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.megars.illusionfxnet.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.megars.illusionfxnet.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://img220.exs.cx/img220/1497/x1ul.jpg [R,NC]
The first line i knows make sit so you can disabel the hotlinking
The next line is what SHOULD allow things that are directly linked
The next 4 lines say that my site is ok for images to be shown
the next line says that anythign with the extension i specify is not shown
well the part for direct linking doesn't work!
I also want to learn all the thing you can do in the htaccess file and how, so i can write a generator. The thing Cpanel has isn't exactly that good...