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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 06-25-2005, 06:24 AM   #1
Bladewire
StraightBro
 
Bladewire's Avatar
 
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!
Bladewire is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-25-2005, 06:56 AM   #2
pudcat
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
pudcat is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-25-2005, 06:58 AM   #3
Bladewire
StraightBro
 
Bladewire's Avatar
 
Industry Role:
Join Date: Aug 2003
Location: Monarch Beach, CA USA
Posts: 56,229
Quote:
Originally Posted by pudcat
I think doing the lookup will hurt if you've got reasonable traffic
I just need to block all .edu domains via my .htaccess.... anyone know how?

Is it deny domain .edu ?
Bladewire is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-25-2005, 07:01 AM   #4
darksoul
Confirmed User
 
darksoul's Avatar
 
Join Date: Apr 2002
Location: /root/
Posts: 4,997
Quote:
Originally Posted by Squirtit
I just need to block all .edu domains via my .htaccess.... anyone know how?

Is it deny domain .edu ?
By default apache gets only the ip of the visitor and not the hostname.
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.
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-25-2005, 07:14 AM   #5
Bladewire
StraightBro
 
Bladewire's Avatar
 
Industry Role:
Join Date: Aug 2003
Location: Monarch Beach, CA USA
Posts: 56,229
Quote:
Originally Posted by darksoul
By default apache gets only the ip of the visitor and not the hostname.
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.

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!
Bladewire is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-25-2005, 07:20 AM   #6
fusionx
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.
fusionx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-25-2005, 07:28 AM   #7
darksoul
Confirmed User
 
darksoul's Avatar
 
Join Date: Apr 2002
Location: /root/
Posts: 4,997
Plus:
Code:
HostnameLookups On
in your apache config.
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-25-2005, 07:38 AM   #8
Bladewire
StraightBro
 
Bladewire's Avatar
 
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?
Bladewire is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-25-2005, 07:45 AM   #9
darksoul
Confirmed User
 
darksoul's Avatar
 
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.
__________________
1337 5y54|)m1n: 157717888
BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
Cambooth
darksoul is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.