![]() |
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? |
you can use the deny rules
|
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 |
yea...i don't know shit about linux man
can someone write it out for me? |
Quote:
|
Quote:
|
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] |
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] |
bump bump
|
Quote:
|
anyone here able to give me a straight answer?
|
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