Reply
Need htaccess help
Old 04-02-2005, 05:43 PM Need htaccess help
chiefbutz's Avatar
Skilled Talker

Posts: 56
Name: Jason
Location: Indiana (USA)
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:
Code:
<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
Code:
<Files ~ "^\.ht">
order allow,deny
deny from all
satisfy all
</Files>
This disables indexes
Code:
Options -Indexes
This is the hotlinkign part

Code:
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...

P.S. Sorry if this is the wrogn place
chiefbutz is offline
Reply With Quote
View Public Profile Visit chiefbutz's homepage!
 
When You Register, These Ads Go Away!
Old 04-04-2005, 10:26 AM
CasaPages's Avatar
SillyPhilly

Posts: 758
Location: between here an somewhere else
I dont know if you have seen this or not but here is a link to the Apache Tutorial on .htaccess files

http://httpd.apache.org/docs/howto/htaccess.html

Since I myself am not that great with them I really cant help other than that.....

Hope this helps a little
__________________
It Happens
FreelanceKillers.com
CasaPages is offline
Reply With Quote
View Public Profile Visit CasaPages's homepage!
 
Old 04-04-2005, 04:39 PM
chiefbutz's Avatar
Skilled Talker

Posts: 56
Name: Jason
Location: Indiana (USA)
Ya, i was pointed to that by someone else
chiefbutz is offline
Reply With Quote
View Public Profile Visit chiefbutz's homepage!
 
Reply     « Reply to Need htaccess help
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12934 seconds with 12 queries