On 1/28/06, Joshua Slive <joshua@xxxxxxxx> wrote: > 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. Joshua, I´ve tried to use absolute URLs, like this: ErrorDocument 401 http://200.xxx.xxx.xxx/solicitar_acesso.php But, the browser shows the default ErrorDocument... Why? Daniel --------------------------------------------------------------------- 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