|
|
|
||||
|
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 |
|
Webmaster
Industry Role:
Join Date: Oct 2001
Location: 2nd door on the left
Posts: 4,063
|
htaccess expert needed...
I need an htaccess file that redirects visitors based on ip blocks...
for example i have all the ip blocks for japan...and i want to redirect them all to an ad page... can you do it? contact me at [email protected] let me know...if it do what i need i'm willing to pay...hehe
__________________
Yep |
|
|
|
|
|
#2 |
|
Confirmed User
Join Date: Jan 2002
Location: Toronto
Posts: 1,227
|
Add the following to the .htaccess file:
< Limit GET > order allow,deny deny from .jp allow from all < /Limit > ErrorDocument 403 http://japanese-popup-hell.com -------------------------------------- Remove unnecessary spaces, otherwise part of the code wouldnt show up
__________________
Alex - ICQ:61889253 - MSN:zubr_zubr at hotmail.com - Skype:zubrzubr |
|
|
|
|
|
#3 | |
|
Webmaster
Industry Role:
Join Date: Oct 2001
Location: 2nd door on the left
Posts: 4,063
|
Quote:
__________________
Yep |
|
|
|
|
|
|
#4 |
|
Registered User
Join Date: May 2002
Posts: 30
|
Yes probably the surfer too....
But why you don't block each IP Instead of a large IPS? Rocco |
|
|
|
|
|
#5 |
|
Confirmed User
Join Date: Feb 2002
Location: Seattle
Posts: 1,070
|
here's what i've got. it's a freebie, 'cause salsbury's a nice guy. (and 'cause i don't know if it'll work perfectly as-is. ;))
just a word of advice: using deny or allow with any type of hostname will force hostnamelookups on, which will slow down your surfer's experience. ie it's not so good. create a file called "punklist.txt" in your site's root directory. add IP blocks and URLs to the file as so: 192.168.0 http://www.someblindlinksponsor.com/ 127.0.0 http://www.whitehouse.gov/ etc. basically it expects to have the first 3 octets there. next, add the following to your httpd.conf file in your VirtualHost directive: RewriteMap punk-o txt:/path/to/server/root/punklist.txt RewriteCond %{REMOTE_ADDR} ^([0-9]*\.[0-9]*\.[0-9]*)\.[0-9]* RewriteCond ${punk-o:%1|OK-TO-PASS} !=OK-TO-PASS RewriteRule ^/.* ${punk-o:%1} [R,L] unfortunately it won't work in the .htaccess file for whatever reason, silly apache. if you'd like an explanation of all this, hit me for e-mail [email protected] . holy crap that took a lot longer to figure out than i expected.
__________________
|
|
|
|
|
|
#6 | |
|
Webmaster
Industry Role:
Join Date: Oct 2001
Location: 2nd door on the left
Posts: 4,063
|
Quote:
but thanks anyways
__________________
Yep |
|
|
|
|
|
|
#7 |
|
Confirmed User
Join Date: Feb 2002
Location: Seattle
Posts: 1,070
|
np. however it probably wouldn't be too hard to set up the list with a good text editor like vi. in any case good luck.
__________________
|
|
|
|
|
|
#8 |
|
Confirmed User
Join Date: Aug 2001
Location: New Orleans
Posts: 1,680
|
Mmm, challenging, that. I love it!
Let's see, order deny,allow # Deny from a specific IP number deny from 123.45.67.89 # Deny from 123.45.6.0 - 123.45.6.255 deny from 123.45.6 # Deny from 123.45.6.34 - 123.45.6.46 deny from 123.45.6.32/28 ... The last one, using netmasks, is the brain cruncher! See http://httpd.apache.org/docs/mod/mod_access.html#allow http://www.darklab.net/resources/netmask.html http://metronet.min.net/Netmasks http://handsonhowto.com/lan101.html for what's needed...
__________________
<CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A> <FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER> |
|
|
|
|
|
#9 |
|
Webmaster
Industry Role:
Join Date: Oct 2001
Location: 2nd door on the left
Posts: 4,063
|
Thanks guys
__________________
Yep |
|
|
|
|
|
#10 |
|
Confirmed User
Join Date: Jul 2001
Location: The Royal Family Crew
Posts: 3,649
|
I hate htaccess!!!
|
|
|
|