Re: [users@httpd] htaccess with mod_auth_mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/27/06, Daniel Silva <danielnsilva@xxxxxxxxx> wrote:
> Hi,
>
> I have a .htaccess file in a direcory of my web server, that contains:
> -------------------------------------------------------------------------------------------
> AuthName "Conteudo exclusivo"
> AuthType Basic
>
> AuthMySQLUser usuario
> AuthMySQLPassword senha
> AuthMySQLDB banco
> AuthMySQLUserTable tabela
> AuthMySQLNameField usuario
> AuthMySQLPasswordField senha
>
> require valid-user
>
> ErrorDocument 401 /solicitar_acesso.php
> -------------------------------------------------------------------------------------------
>
> The question is: when i try to access a file in the protected
> directory, cancelling the authentication, the file
> "solicitar_acesso.php" is loaded, but on load, trying to open CSS
> files e images of the page, the authentication is required again, and
> if don´t make it the files don´t open. The file "solicitar_acesso.php"
> and others files aren´t in the protected directory.

When apache servers the errordocument, it doesn't tell the browser the
location that it is serving from, so the browser still sees the URL as
being the originally requested (authenticated) url.  Hence all
relative URLs in the errordocument will be interpreted relative to the
authenticated document.

The fix is to use only absolute URLs (starting in http:// or at least
/) in the errordocument.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux