|
|
|
#1 (permalink) |
|
Messages: n/a
Hébergeur: |
I want to block a range of IP addresses and have a special page display
when an IP in that range tries to access my site. Blocking the range with htaccess I can do, but how do I tell htaccess to serve my custom page? (if it can be done) -- "Because all you of Earth are idiots!" ¯`·..·¯`·-> freemont <-·¯`·..·¯ |
|
|
|
#2 (permalink) |
|
Messages: n/a
Hébergeur: |
On Sat, 15 Sep 2007 14:00:04 +0000, freemont wrote:
> I want to block a range of IP addresses and have a special page > display when an IP in that range tries to access my site. > Blocking the range with htaccess I can do, but how do I tell htaccess > to serve my custom page? (if it can be done) If you are denying, what's wrong with: |order allow,deny |allow from all |. |. |# 210/8 APNIC (whois.apnic.net) |# 211/8 APNIC (whois.apnic.net) |deny from 210.0.0.0/8 |deny from 211.0.0.0/8 |. |. |ErrorDocument 403 /path/to/custom_page.html Or, am I missing something here? Jonesy -- Marvin L Jones | jonz | W3DHJ | linux 38.24N 104.55W | @ config.com | Jonesy | OS/2 *** Killfiling google posts: <http://jonz.net/ng.htm> |
|
|
|
#3 (permalink) |
|
Messages: n/a
Hébergeur: |
On Sat, 15 Sep 2007 15:39:35 +0000, Allodoxaphobia writ:
> On Sat, 15 Sep 2007 14:00:04 +0000, freemont wrote: > >> I want to block a range of IP addresses and have a special page display >> when an IP in that range tries to access my site. Blocking the range >> with htaccess I can do, but how do I tell htaccess to serve my custom >> page? (if it can be done) > > > If you are denying, what's wrong with: > <htaccess code> > > Or, am I missing something here? > > Jonesy Well I wanted to serve up a specific 403 to only that IP range, but I decided to just keep it simple, and give all blocked addresses the same page. Thanks anyway. :-) -- "Because all you of Earth are idiots!" ¯`·..·¯`·-> freemont <-·¯`·..·¯ |
|
![]() |
| Outils de la discussion | |
|
|