Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 86189 invoked from network); 28 Jan 2006 16:27:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Jan 2006 16:27:51 -0000 Received: (qmail 89120 invoked by uid 500); 28 Jan 2006 16:27:41 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 89107 invoked by uid 500); 28 Jan 2006 16:27:40 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 89096 invoked by uid 99); 28 Jan 2006 16:27:40 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jan 2006 08:27:40 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jslive@gmail.com designates 64.233.162.201 as permitted sender) Received: from [64.233.162.201] (HELO zproxy.gmail.com) (64.233.162.201) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jan 2006 08:27:39 -0800 Received: by zproxy.gmail.com with SMTP id 12so780453nzp for ; Sat, 28 Jan 2006 08:27:19 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=iceIQAbPn/Vrfcypa2GKnE1Cn61PD7+Zs636F/Mgj6PTBjxRAxIUQOt5MKHqNuiUWUURPmky2o/OcTUtt8FsIwU9RccNeWZmthI6RVty4vWCr/CytV0FtKHeiIWSVWuxgzT+FHCNeiHkAVgj1DwFgT1NTNJl/X47gxiRFZ9nNE4= Received: by 10.64.253.4 with SMTP id a4mr1026441qbi; Sat, 28 Jan 2006 08:27:12 -0800 (PST) Received: by 10.65.15.4 with HTTP; Sat, 28 Jan 2006 08:27:12 -0800 (PST) Message-ID: Date: Sat, 28 Jan 2006 11:27:12 -0500 From: Joshua Slive Sender: jslive@gmail.com To: users@httpd.apache.org In-Reply-To: <71324230601272035t33d13763y1a3b6bae9d78fe65@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <71324230601272035t33d13763y1a3b6bae9d78fe65@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] htaccess with mod_auth_mysql X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On 1/27/06, Daniel Silva 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=B4t make it the files don=B4t open. The file "solicitar_acesso.php= " > and others files aren=B4t 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 for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org