Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



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

Posts: 60
Name: Jason
Location: Indiana (USA)
Trades: 0
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!
 
 
Register now for full access!
Old 04-04-2005, 11:26 AM
CasaPages's Avatar
SillyPhilly

Posts: 758
Location: between here an somewhere else
Trades: 0
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

Please login or register to view this content. Registration is FREE
CasaPages is offline
Reply With Quote
View Public Profile Visit CasaPages's homepage!
 
Old 04-04-2005, 05:39 PM
chiefbutz's Avatar
Skilled Talker

Posts: 60
Name: Jason
Location: Indiana (USA)
Trades: 0
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 Search this Thread
Search this Thread:

Advanced Search

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

BB 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.14357 seconds with 12 queries