|
|
|
|
|
|
| Author |
Message |
Daniel Silva *nix forums beginner
Joined: 06 Apr 2005
Posts: 11
|
Posted: Sun Jan 29, 2006 3:01 am Post subject:
Re: htaccess with mod_auth_mysql
|
|
|
| Quote: | Ok, Joshua. But the apache documentation says:
Keep reading. It says (in bold text): if you use an ErrorDocument 401
directive then it must refer to a local document.
Joshua.
|
Ok, I see it. Once again, thanks for the support.
---------------------------------------------------------------------
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org |
|
| Back to top |
|
 |
Joshua Slive *nix forums Guru
Joined: 07 Feb 2005
Posts: 1647
|
Posted: Sun Jan 29, 2006 2:49 am Post subject:
Re: htaccess with mod_auth_mysql
|
|
|
On 1/28/06, Daniel Silva <danielnsilva@gmail.com> wrote:
| Quote: | Ok, Joshua. But the apache documentation says:
|
Keep reading. It says (in bold text): if you use an ErrorDocument 401
directive then it must refer to a local document.
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org |
|
| Back to top |
|
 |
Daniel Silva *nix forums beginner
Joined: 06 Apr 2005
Posts: 11
|
Posted: Sun Jan 29, 2006 1:19 am Post subject:
Re: htaccess with mod_auth_mysql
|
|
|
On 1/28/06, Joshua Slive <joshua@slive.ca> wrote:
| Quote: | On 1/28/06, Daniel Silva <danielnsilva@gmail.com> wrote:
The fix is to use only absolute URLs (starting in http:// or at least
/) in the errordocument.
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?
I meant to use absolute references inside the php file pointed to by
ErrorDocument. The Errordocument directive itself must not use an
absolute url, as the docs or error_log would tell you.
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
|
Ok, Joshua. But the apache documentation says:
-------------------------------------------------------------
URLs can begin with a slash (/) for local web-paths (relative to the
DocumentRoot), or be a full URL which the client can resolve.
Alternatively, a message can be provided to be displayed by the
browser. Examples:
ErrorDocument 500 http://foo.example.com/cgi-bin/tester
ErrorDocument 404 /cgi-bin/bad_urls.pl
ErrorDocument 401 /subscription_info.html
ErrorDocument 403 "Sorry can't allow you access today"
-------------------------------------------------------------
Therefore I thought that you spoke about the directive ErrorDocument.
But now i know that absolute references must not used for Error 401.
Thanks for support.
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org |
|
| Back to top |
|
 |
Joshua Slive *nix forums Guru
Joined: 07 Feb 2005
Posts: 1647
|
Posted: Sun Jan 29, 2006 12:55 am Post subject:
Re: htaccess with mod_auth_mysql
|
|
|
On 1/28/06, Daniel Silva <danielnsilva@gmail.com> wrote:
| Quote: | The fix is to use only absolute URLs (starting in http:// or at least
/) in the errordocument.
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?
|
I meant to use absolute references inside the php file pointed to by
ErrorDocument. The Errordocument directive itself must not use an
absolute url, as the docs or error_log would tell you.
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org |
|
| Back to top |
|
 |
Daniel Silva *nix forums beginner
Joined: 06 Apr 2005
Posts: 11
|
Posted: Sun Jan 29, 2006 12:37 am Post subject:
Re: htaccess with mod_auth_mysql
|
|
|
On 1/28/06, Joshua Slive <joshua@slive.ca> wrote:
| Quote: | On 1/27/06, Daniel Silva <danielnsilva@gmail.com> 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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org |
|
| Back to top |
|
 |
Joshua Slive *nix forums Guru
Joined: 07 Feb 2005
Posts: 1647
|
Posted: Sat Jan 28, 2006 4:27 pm Post subject:
Re: htaccess with mod_auth_mysql
|
|
|
On 1/27/06, Daniel Silva <danielnsilva@gmail.com> wrote:
| Quote: | 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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org |
|
| Back to top |
|
 |
Daniel Silva *nix forums beginner
Joined: 06 Apr 2005
Posts: 11
|
Posted: Sat Jan 28, 2006 4:35 am Post subject:
htaccess with mod_auth_mysql
|
|
|
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.
RHEL3
httpd-2.0.46-25.ent
mod_auth_mysql-20030510-1.ent
Any idea?
PS: Sorry my poor english.
[]s
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@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Thu Jan 08, 2009 1:55 pm | All times are GMT
|
|
PS2 Cheat Codes | Bank Credit Cards | Credit Cards | Problem Mortgage | Free Mmorpg
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|