Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> .htaccess
SET
post 21.12.2004, 19:07:47
Post #1





Grupa: Zarejestrowani
Postów: 75
Pomógł: 0
Dołączył: 21.07.2004

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


.htaccess
  1. <?php
  2. ErrorDocument 401 /strona%201/index.php
  3.  
  4. AuthUserFile /strona%201/admin/.htpass
  5. AuthGroupFile /dev/null
  6. AuthName &#092;"Nazwa\"
  7. AuthType Basic
  8. require valid-user
  9. ?>


.htpass (wygenerowany przez htpasswd)
  1. <?php
  2. tomek:$apr1$jU......$.4Kv9ewR.UTsvfYchMiVd.
  3. ?>


otwieram katalog -> wyswietla się form logowania -> wpisuje nazwa uz i haslo -> i nic ?

windows xp,

z góry thx, smile.gif smile.gif smile.gif smile.gif smile.gif smile.gif
Go to the top of the page
+Quote Post
dr_bonzo
post 21.12.2004, 19:22:26
Post #2





Grupa: Przyjaciele php.pl
Postów: 5 724
Pomógł: 259
Dołączył: 13.04.2004
Skąd: N/A

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


http://httpd.apache.org/docs-2.0/howto/auth.html

Nie podajesz prawidlowo sciezki do plikow:
Cytat
The AuthUserFile directive sets the name of a textual file containing the list of users and passwords for user authentication. File-path is the path to the user file. If it is not absolute (i.e., if it doesn't begin with a slash), it is treated as relative to the ServerRoot.


Kod
ErrorDocument 401 /strona%201/index.php
AuthUserFile /strona%201/admin/.htpass
AuthGroupFile /dev/null

// zmien na

ErrorDocument 401 C:/jakis_katalog/strona%201/index.php
AuthUserFile C:/jakis_katalog/strona%201/admin/.htpass
AuthGroupFile ... // mozesz usunac ta linie

Skoro uzywasz windowsa to nie mozesz podawac unixowych sciezek.

Ten post edytował dr_bonzo 21.12.2004, 19:27:12


--------------------
Nie lubię jednorożców.
Go to the top of the page
+Quote Post
SET
post 21.12.2004, 19:44:06
Post #3





Grupa: Zarejestrowani
Postów: 75
Pomógł: 0
Dołączył: 21.07.2004

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


zmieniłem i jak dam anuluj to mnie nie przekierowywuje na strone główną ? (/strona%201/index.php -> to przekierowało poprawnie), po drugie wpisuje nazwe uz i haslo -> daje ok i znowu pojawia sie formularz logowania ?

httpd
Kod
<Directory "C:\Apache\Apache2\htdocs">
    AllowOverride FileInfo AuthConfig Limit
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    <Limit GET POST OPTIONS PROPFIND>
        Order allow,deny
        Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
        Order deny,allow
        Deny from all
    </LimitExcept>
</Directory>


Ten post edytował SET 21.12.2004, 20:23:21
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 20.06.2025 - 22:29