|
|
|
||||
|
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 |
|
StraightBro
Industry Role:
Join Date: Aug 2003
Location: Monarch Beach, CA USA
Posts: 56,229
|
I need mod rewrite to deny all .edu domains
Or to redirect them to 404 page.... PLEASE help
Thanks! |
|
|
|
|
|
#2 |
|
Confirmed User
Join Date: Mar 2003
Posts: 1,169
|
I think doing the lookup will hurt if you've got reasonable traffic
__________________
SUBMIT YOUR BABE GALLERIES PROMOTE YOUR BLOG HERE always looking for hardlinks icq #207011694 Thunder-Ball.net, good for hardlink exchanges |
|
|
|
|
|
#3 | |
|
StraightBro
Industry Role:
Join Date: Aug 2003
Location: Monarch Beach, CA USA
Posts: 56,229
|
Quote:
Is it deny domain .edu ? |
|
|
|
|
|
|
#4 | |
|
Confirmed User
Join Date: Apr 2002
Location: /root/
Posts: 4,997
|
Quote:
In order to block hostnames ending in .edu you'd have to reverse all the ips that are visiting your sites. Reverse resolution its a pretty slow process so like he said if you have lots of traffic this isn't an option. You're only escape would be a database like maxmind's (aka geoip database) that has the .edu ips. |
|
|
|
|
|
|
#5 | |
|
StraightBro
Industry Role:
Join Date: Aug 2003
Location: Monarch Beach, CA USA
Posts: 56,229
|
Quote:
Ok so let's say I'm willing to sacrifice the process time to block all .edu domains... how do I do it? I appreciate your help on this.. thanks! |
|
|
|
|
|
|
#6 |
|
Confirmed User
Industry Role:
Join Date: Nov 2003
Location: Olongapo City, Philippines
Posts: 4,618
|
to redirect to a page:
RewriteEngine on RewriteCond %{HTTP_HOST} *\.edu RewriteRule ^(.*)$ http://www.yourdomain.com/404.html$1 [R,L] to just drop the request: RewriteEngine on RewriteCond %{HTTP_HOST} *\.edu RewriteRule ^(.*)$ - [L] "should" work. You may need to tweak the RewriteCond string match. |
|
|
|
|
|
#8 |
|
StraightBro
Industry Role:
Join Date: Aug 2003
Location: Monarch Beach, CA USA
Posts: 56,229
|
OK thanks guys. Are you sure I have to do the hostnamelookups call?
So HostnameLookups On [in the apache config] and RewriteEngine on RewriteCond %{HTTP_HOST} *\.edu RewriteRule ^(.*)$ - [L] in my .htaccess? |
|
|
|
|
|
#9 |
|
Confirmed User
Join Date: Apr 2002
Location: /root/
Posts: 4,997
|
Yes.
Just be warned that every visitor will have a small delay before reaching your site while the ip address is resolved. |
|
|
|