GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   htaccess help!!! (https://gfy.com/showthread.php?t=586035)

pr0 03-12-2006 09:16 PM

htaccess help!!!
 
Heres what my htaccess looks like on a search engine cloaked domain i have going to a sponsor

RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^(.*)$ http://spsonsor.com/?111111 [R=301,L]


Now what i need to do, is block out all .gov, .us, .org & anything with the prefix k12....its part of my campaign to keep kids & people using public computers off my porn sites.

So how would i add that to my htaccess?

fris 03-12-2006 09:18 PM

you can use the deny rules

dissipate 03-12-2006 09:19 PM

order allow,deny
deny from .gov
deny from .us
deny from .k12 (im not sure where the k12 is in the IP)
allow from all


To block a specific IP, just type in the full IP address - e.g. 192.168.1.1
To block a range of IP's, use a partial IP address - e.g. 192.168.1
To block a country, type in the tail extension - e.g. .au

mind you, this isnt going to block anything if thier IP doesnt reverse correctly

pr0 03-12-2006 09:19 PM

yea...i don't know shit about linux man

can someone write it out for me?

dissipate 03-12-2006 09:26 PM

Quote:

Originally Posted by pr0
yea...i don't know shit about linux man

can someone write it out for me?

Hope that helped.

pr0 03-12-2006 09:31 PM

Quote:

Originally Posted by dissipate
Hope that helped.

yea should i paste it on top of my code i already have, or below?

mikeyddddd 03-12-2006 09:44 PM

I use this:

RewriteCond %{REMOTE_HOST} .*\.gov$ [NC,OR]
RewriteCond %{REMOTE_HOST} .*\.us$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*\.gov$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*\.gov/.* [NC,OR]
RewriteCond %{HTTP_REFERER} .*\.us$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*\.us/.* [NC]
RewriteRule .* http://www.www-web.com/ [R,L]

pr0 03-12-2006 09:54 PM

so would it be......

RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^(.*)$ http://spsonsor.com/?111111 [R=301,L]
RewriteCond %{REMOTE_HOST} .*\.gov$ [NC,OR]
RewriteCond %{REMOTE_HOST} .*\.us$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*\.gov$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*\.gov/.* [NC,OR]
RewriteCond %{HTTP_REFERER} .*\.us$ [NC,OR]
RewriteCond %{HTTP_REFERER} .*\.us/.* [NC]
RewriteRule .* http://www.www-web.com/ [R,L]

pr0 03-12-2006 10:15 PM

bump bump

Decadawn 03-12-2006 10:42 PM

Quote:

Originally Posted by dissipate
order allow,deny
deny from .gov
deny from .us
deny from .k12 (im not sure where the k12 is in the IP)
allow from all

doesn't putting "allow from all" at the end cancel all the denies above?

pr0 03-12-2006 10:51 PM

anyone here able to give me a straight answer?

pr0 03-12-2006 11:00 PM

damn this sucks


All times are GMT -7. The time now is 04:18 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123