PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > alt.www.webmaster > serve custom page to blocked ip
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
serve custom page to blocked ip

Réponse
 
LinkBack Outils de la discussion
Vieux 15/09/2007, 15h00   #1 (permalink)
freemont
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut serve custom page to blocked ip

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 <-·¯`·..·¯
  Réponse avec citation
Vieux 15/09/2007, 16h39   #2 (permalink)
Allodoxaphobia
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: serve custom page to blocked ip

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>
  Réponse avec citation
Vieux 15/09/2007, 19h32   #3 (permalink)
freemont
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: serve custom page to blocked ip

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 <-·¯`·..·¯
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 10h36.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08535 seconds with 11 queries