Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> .htaccess - dir protection, Internal Server Error
r4xz
post
Post #1





Grupa: Zarejestrowani
Postów: 673
Pomógł: 106
Dołączył: 31.12.2008

Ostrzeżenie: (0%)
-----


http://r4xz.pl/admin/

.htaccess
Kod
AuthUserFile /public_html/.htpasswd
AuthType Basic
AuthName "podaj haslo"

Require valid-user


.htpasswd
Kod
admin:abc


zagooglowałem się i nic...
co jest nie tak? (IMG:style_emoticons/default/sciana.gif)

Ten post edytował r4xz 14.08.2010, 18:17:31
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
r4xz
post
Post #2





Grupa: Zarejestrowani
Postów: 673
Pomógł: 106
Dołączył: 31.12.2008

Ostrzeżenie: (0%)
-----


no to teraz kompletnie nie wiem co mam podać
może jakaś podpowiedź? (IMG:style_emoticons/default/wstydnis.gif)

  1. <?php
  2.  
  3. $login = "a";
  4. $haslo = "b";
  5.  
  6. if ($_SERVER["PHP_AUTH_USER"]<>$login or $_SERVER["PHP_AUTH_PW"]<>$haslo) {
  7. header("WWW-Authenticate: Basic realm=\"PA login: kura Hasło: test\"\n");
  8. header("HTTP/1.0 401 Unauthorized\n");
  9. echo "Brak autoryzacji!";
  10. }
  11.  
  12. ?>

problem rozwiązany (IMG:style_emoticons/default/winksmiley.jpg)
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 10.06.2026 - 11:11