Quote:
Originally Posted by darksoul
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]