Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 06:40 PM
xman
Guest
 
Posts: n/a
Default IP restricted site

I would like to have a home page the will display
a stop light with a red or green light if you are viewing the page from
the allowed network ( green light )
not on the allowed network
( red light )
I will do the lock down in apache.

Is there any examples on how this could be done ( sample code)
( I will work on the stop light image ) I just need the html logic.
has to work on IE 6 and netscape 6.0 <
any examples or places to look would be great.




  #2  
Old July 20th, 2005, 06:40 PM
Harlan Messinger
Guest
 
Posts: n/a
Default Re: IP restricted site

"xman" <imiller@bsd.uchicago.edu> wrote:
[color=blue]
>I would like to have a home page the will display
>a stop light with a red or green light if you are viewing the page from
>the allowed network ( green light )
>not on the allowed network
>( red light )
> I will do the lock down in apache.
>
>Is there any examples on how this could be done ( sample code)
>( I will work on the stop light image ) I just need the html logic.
>has to work on IE 6 and netscape 6.0 <
>any examples or places to look would be great.[/color]

This is more of a CGI question than an HMTL one. The answer will
depend on what server-side programming language you're using, but it
involves reading the REMOTE_ADDR value sent with the request in the
HTTP headers.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ๔ter le premier point de mon adresse de courriel.
  #3  
Old July 20th, 2005, 06:40 PM
Jim Dabell
Guest
 
Posts: n/a
Default Re: IP restricted site

Harlan Messinger wrote:
[color=blue]
> "xman" <imiller@bsd.uchicago.edu> wrote:
>[color=green]
>>I would like to have a home page the will display
>>a stop light with a red or green light if you are viewing the page from
>>the allowed network ( green light )
>>not on the allowed network
>>( red light )
>> I will do the lock down in apache.
>>
>>Is there any examples on how this could be done ( sample code)
>>( I will work on the stop light image ) I just need the html logic.[/color][/color]

<sig-bait>There's no logic in HTML.</sig-bait>

Seriously, HTML doesn't _do_ stuff, there aren't conditionals. It just
describes data.

[color=blue][color=green]
>>has to work on IE 6 and netscape 6.0 <
>>any examples or places to look would be great.[/color]
>
> This is more of a CGI question than an HMTL one. The answer will
> depend on what server-side programming language you're using, but it
> involves reading the REMOTE_ADDR value sent with the request in the
> HTTP headers.[/color]

He said he's using Apache to turn people away; there's no need for a script
to be checking the IP address. Just use Apache's error handler.

<URL:http://httpd.apache.org/docs-2.0/mod/core.html#errordocument>

Basically, just plonk down a file at /errors/401.html and put the following
in .htaccess:

ErrorDocument 401 /errors/401.html

Obviously, you have to allow everyone to access the error document.


--
Jim Dabell

  #4  
Old July 20th, 2005, 06:40 PM
xman
Guest
 
Posts: n/a
Default Re: IP restricted site

I only have part of the site restricted
I kind of wanted to make it look nice so that
if management was off site and hit the page they could see that the
downloads would not work
.... or anyone else.
then if they click on the link it can give them the error code. The green
light ... all is good the links work.
I guess I will look into perl for this
thanks.

"Jim Dabell" <jim-usenet@jimdabell.com> wrote in message
news:KvidneHAHLWo-q_dRVn-ig@giganews.com...[color=blue]
> Harlan Messinger wrote:
>[color=green]
> > "xman" <imiller@bsd.uchicago.edu> wrote:
> >[color=darkred]
> >>I would like to have a home page the will display
> >>a stop light with a red or green light if you are viewing the page from
> >>the allowed network ( green light )
> >>not on the allowed network
> >>( red light )
> >> I will do the lock down in apache.
> >>
> >>Is there any examples on how this could be done ( sample code)
> >>( I will work on the stop light image ) I just need the html logic.[/color][/color]
>
> <sig-bait>There's no logic in HTML.</sig-bait>
>
> Seriously, HTML doesn't _do_ stuff, there aren't conditionals. It just
> describes data.
>
>[color=green][color=darkred]
> >>has to work on IE 6 and netscape 6.0 <
> >>any examples or places to look would be great.[/color]
> >
> > This is more of a CGI question than an HMTL one. The answer will
> > depend on what server-side programming language you're using, but it
> > involves reading the REMOTE_ADDR value sent with the request in the
> > HTTP headers.[/color]
>
> He said he's using Apache to turn people away; there's no need for a[/color]
script[color=blue]
> to be checking the IP address. Just use Apache's error handler.
>
> <URL:http://httpd.apache.org/docs-2.0/mod/core.html#errordocument>
>
> Basically, just plonk down a file at /errors/401.html and put the[/color]
following[color=blue]
> in .htaccess:
>
> ErrorDocument 401 /errors/401.html
>
> Obviously, you have to allow everyone to access the error document.
>
>
> --
> Jim Dabell
>[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles