|Subject:||Re: newbie: problem with .htaccess|
|Date:||Tue, 29 Sep 2009|
> I have little experience with Apache.
It's alright. We'll try to clarify some concepts.
> I want to use SSL for C:\Program Files\Apache Software Foundation
ieruchomosci-ogloszenia\secure folder. I created
> denial.html page in this folder and .htpass file.
Encrypting (SSL) is not the same as password-protecting (AuthUserFile).
If you need both, try to fix one at a time.
> In .htaccess I have such lines:
> ErrorDocument 401 htdocs/nieruchomosci-ogloszenia/secure/denial.html
> AuthUserFile htdocs/nieruchomosci-ogloszenia/secure/.htpass
> Now I can log on with data from .htpass.
> The problem #1 is that I don't understand why I had to enter "htdocs"
> before /nieruchomosci-ogloszenia/secure/.htpass.html. Without this I
> could not receive login dialog.
"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, it is treated as
relative to the ServerRoot."
So it looks like your DocumentRoot directive is set to "C:\Program
Files\Apache Software Foundation\Apache2.2\htdocs". Which is a weird
setting, by the way.
> The problem #2 is that when I press ESC in login dialog I can see
> path as text in the browser instead of redirection.
"In the event of a problem or error, Apache can be configured to do one
of four things,
1. output a simple hardcoded error message
2. output a customized message
3. redirect to a local URL-path to handle the problem/error
4. redirect to an external URL to handle the problem/error
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"
The string "htdocs/nieruchomosci-ogloszenia/secure/denial.html" only
matches option number 1. You probably mean:
newbie: problem with .htaccess posted by Jivanmukta on Tue, 29 Sep 2009