![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
|
.htaccess question, pulling up external list.txt
Need to use the same list of IP's to block on a few of my sites. Can I make it go to a list.txt file on the server somehow?
Current .htaccess: ##### start anti spy squirrel script deny from XX.XX.XX.X ErrorDocument 403 /error.html ##### end anti spy squirrel script want to: ##### start anti spy squirrel script deny from http://www.mysite.com/list.txt ErrorDocument 403 /error.html ##### end anti spy squirrel script and in list.txt i will list the ip's I want to block line by line. How do I properly say this line? deny from http://www.mysite.com/list.txt |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Registered User
Join Date: Mar 2003
Posts: 73
|
I think you can do it with mod rewrite
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
|
code perhaps?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Now choke yourself!
Industry Role:
Join Date: Apr 2006
Posts: 12,085
|
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" Code:
RewriteCond %{HTTP_REFERER} ^http://clownpenis\.fart/booz.html [NC, OR]... RewriteRule ^.*$ - [F]
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Toronto
Posts: 4,001
|
Thanks dude will try that out
|
![]() |
![]() ![]() ![]() ![]() ![]() |