Bepaalde ip adressen mogen de site zijn

Gestart doorReins26 reacties61 weergaven

27 berichten · pagina 1 van 2

Reins

Lid · Topicstarter

Berichten
14.363
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hi,
ik heb een site,
maar om het nu op blabla.nl/beta te gooien is te veel werk.
Dus hoe kan ik (dmv een htacces?) alleen mijn ip toestaan en de rest niet?
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Codeblok (htaccess):

1
2
3
4
5

Order Allow, Deny
Deny From All
Allow From hier.het.ip.geval
Allow From dat.de.site.mag
Allow From be.ki.jk.en
0
Reins

Lid · Topicstarter

Berichten
14.363
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@socialfeed.nl and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.14 mod_antiloris/0.3 Server at socialfeed.nl Port 80
0
Berichten
1.054
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
$toegestaan[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]ip-nummer 1[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]ip-nummer 2[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/in_array"]in_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDRESS[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$toegestaan[/COLOR][COLOR= #007700]))
{[/COLOR]
    [COLOR= #FF8000]// toegestaan[/COLOR]
[COLOR= #007700]}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
    [COLOR= #FF8000]// niet toegestaan[/COLOR]
[COLOR= #007700]}[/COLOR]
?>


zou gewoon moeten werken smile
0
Berichten
6.722
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ik gebruik zelf voor de beta pagina voor scriptmania dit:

ErrorDocument 403 http://www.pagina waar de mensen die geen toestemming hebben naartoe worden gestuurd.nl
Order deny,allow
Deny from all
Allow from ip-adres
Allow from ip-adres
0
Reins

Lid · Topicstarter

Berichten
14.363
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hdradio schreef:
[COLOR= #0000BB]<?php
$toegestaan[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]ip-nummer 1[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]ip-nummer 2[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/in_array"]in_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDRESS[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$toegestaan[/COLOR][COLOR= #007700]))
{[/COLOR]
    [COLOR= #FF8000]// toegestaan[/COLOR]
[COLOR= #007700]}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
    [COLOR= #FF8000]// niet toegestaan[/COLOR]
[COLOR= #007700]}[/COLOR]
?>
zou gewoon moeten werken smile
[COLOR= #0000BB]<?php
$toegestaan[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]ip-nummer 1[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]ip-nummer 2[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/in_array"]in_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDRESS[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$toegestaan[/COLOR][COLOR= #007700]))
{[/COLOR]
    gewone index
[COLOR= #007700]}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
   [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]404.php[/COLOR][COLOR= #007700]);
}[/COLOR]
?>


Kan dat dan?
0
Berichten
1.054
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja dat kan smile
0
Berichten
1.314
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
sinds wanneer kan $_SERVER[REMOTE_ADDRESS] dan nopompom volgens mij is het altijd nog $_SERVER[REMOTE_ADDR]
0
Tom

Lid

Berichten
3.868
Reputatie
0
Punten
0,02
Lid sinds
Laatst gezien
Ik heb nog wel een betá key systeem liggen, als je een demo wilt zien, stuur dan effe een pb.
0
Reins

Lid · Topicstarter

Berichten
14.363
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hdradio schreef:
Ja dat kan smile
Helaas niet, het werkt niet ;(
0
Berichten
2.517
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php
$toegestaan[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]ip-nummer 1[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]ip-nummer 2[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/in_array"]in_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$toegestaan[/COLOR][COLOR= #007700]))
{[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]Je hebt toegang[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
   [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]404.php[/COLOR][COLOR= #007700]);
}[/COLOR]
?>


Probeer dat eens ?
0
Reins

Lid · Topicstarter

Berichten
14.363
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ook niet.
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Krijg je een fout ofzo?
0
Reins

Lid · Topicstarter

Berichten
14.363
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nope, gewoon iedereen kan hem bekijken.
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?[/COLOR]php
[COLOR= #0000BB]$toegestaan[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/array"]array[/URL][COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$toegestaan[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]ip-nummer 1[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// veranderen in jouw ip[/COLOR]
[COLOR= #0000BB]$toegestaan[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #DD0000]ip-nummer 2[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// extra toevoegen door $toegestaan[] = IP_HIER; hier onder te zetten[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/in_array"]in_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]REMOTE_ADDR[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$toegestaan[/COLOR][COLOR= #007700]))[/COLOR]
    [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Geen toegang[/COLOR][COLOR= #007700]);[/COLOR]
// Hier rest van pagina


En zo?
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren