View Single Post
Old 02-03-2010, 09:11 PM  
GrouchyAdmin
Now choke yourself!
 
GrouchyAdmin's Avatar
 
Industry Role:
Join Date: Apr 2006
Posts: 12,085
Quote:
Originally Posted by darksoul View Post
you can't do that with .htaccess alone.
Why did you base64 encode your ICQ?

Also, what's stated here.

It'd be easier for you just to make a script which reads the list.txt and prepends it to your .htaccess

This has no bounds checking and is dumb as hell, but will do what you want. Trivially wrapped as a CGI so you can activate via browser rather than shell. Again, it's stupid, but it's free.

addnewbans.cgi:
Code:
#/bin/sh
echo "Content-type: text/plain"
echo ""
echo "Parsing list.txt in current directory..."
for n in `cat list.txt`; do echo "deny from $n" >> newshit
cp .htacess .htaccess-last
mv newshit .htaccess
cat .htaccess-last >> .htaccess
echo "Done. .htaccess has new bans set; last copy is saved as .htaccess-last"
Edit: For denying a specific URL you'll want to use mod_rewrite.

Code:
RewriteCond %{HTTP_REFERER} ^http://clownpenis\.fart/booz.html [NC, OR]...
RewriteRule ^.*$ - [F]
__________________

Last edited by GrouchyAdmin; 02-03-2010 at 09:22 PM.. Reason: I only answered part of the question.
GrouchyAdmin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote