#90463
06/04/2005 6:19 PM
|
Joined: Jun 2001
Posts: 729
Coder
|
Coder
Joined: Jun 2001
Posts: 729 |
Just noticed a ton of places linking off my images  Did a search a wanted to implement LKs method but it does not seem to be working properly... login.cgi - located in cgi-bin folder anc chmoded to 755 #!/usr/bin/perl my $qs = $ENV{QUERY_STRING}; $qs =~ s/^file=/noncgi///isg; open(FILE, ">>/usr/local/hostboard/mainboard/htdocs/logg.cgi"); print FILE "$ENV{'REMOTE_ADDR'} - $qs - $ENV{HTTP_REFERER}"; close(FILE); chmod(0777, "/usr/local/hostboard/mainboard/htdocs/logg.cgi"); if ($qs =~ /(.gif|.jpg)$/) { print "Location: http://www.hostboard.com/stolen.gif"; } else { print "Content-type: text/html"; print qq~<html>....~;} .htaccess in a folder with images I am looking to block. RewriteEngine On Options +FollowSymlinks ## LK #RewriteBase / ## Rewrite Rule for images RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !hostboard.com [NC] RewriteRule ^(.*)$ http://www.hostboard.com/cgi-bin/loggin.cgi?file=%{REQUEST_URI} [R,L] DirectoryIndex / Will this also block directories underneath the one I am also trying to protect or do I have to copy .htaccess into each folder?
|
|
|
#90464
06/04/2005 7:33 PM
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
.htaccess should be read by any directory UNDER the one that the file is located in... IE: I have .htaccess in /var/www/html (or www.gizzy.com/); any directories under /var/www/html (or www.gizzy.com/) read the rules of the .htaccess file. Myself, I just manage my own .htaccess as: # Turn Rewrite Engine On # RewriteEngine on
# Start Allowed Hosts # RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !virtualnightclub.net [NC] RewriteCond %{HTTP_REFERER} !69.9.166.202 [NC] RewriteCond %{HTTP_REFERER} !ubbdev.com [NC] RewriteCond %{HTTP_REFERER} !ubbcentral.com [NC] RewriteCond %{HTTP_REFERER} !infopop.com [NC] RewriteCond %{HTTP_REFERER} !ubbdev.com [NC] # End Allowed Hosts #
# Start defined files & redirect location # RewriteRule .*.(jpg|jpeg|bmp|gif|png|psd)$ http://errors.virtualnightclub.net/dnl.gif [R,NC] # End defined files & redirect location # replace the error image with any you want, if you don't want one then just replace it with a "-".
|
|
|
#90465
06/04/2005 11:09 PM
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
preferrably an image 3000x3000 
|
|
|
#90466
06/05/2005 1:53 AM
|
Joined: Jun 2001
Posts: 729
Coder
|
Coder
Joined: Jun 2001
Posts: 729 |
The only thing I really liked about LKs was the ability to log who was linking to you. Anyway to figure out why it is not working? Maybe I did something wrong?
|
|
|
#90467
06/05/2005 2:22 AM
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
|
|
|
#90468
08/11/2005 2:17 AM
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
Joined: Mar 2001
Posts: 7,394 |
Could it be because your file is called login.cgi but you're linking to loggin.cgi? 
|
|
|
#90469
08/11/2005 12:11 PM
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
hehe, I'd check that first 
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 449
Joined: February 2008
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|