Check out my site, I just did the same thing.

http://www.lesneste.com

I used to have a bunch of personal info out there for the world to see, but
I decided it was invitation to identity theft so I put it behind a
password.  Now, to get access, you have to reveal an email address to which
your password will be mailed, which I think is a reasonable tradeoff.

I decided I wanted to stay with HTML files as much as possible so I could
develop most of my pages on my local hard drive without an HTTP server in
the loop.  This mandated no sessions, just .htaccess.  I use one PHP page
that lets users request their password.

I found something bizarre (unexpected in a way that makes no sense to me)
with Apache ErrorDocuments, namely, that you can specify an ErrorDocument
in another directory besides the one containing the file that generated the
error, and that ErrorDocument will be loaded, but all relative URLs within
that page will be resolved relative to the original directory (the one
containing the .htaccess file).  My solution to this was to use absolute
URLs instead of relative in the ErrorDocument for things like specifying
IMGs.  I don't like using absolute URLs, but it worked.

Here's the .htaccess that gets the job done.  Notice I care about a 401
(authorization) and not 404.

=========================================================

AuthUserFile /yourpathhere/.htpasswd
AuthGroupFile /dev/null
AuthName "Personal"
AuthType Basic
ErrorDocument 401 /requestpwd.php?func=intro&secn=photos

<Limit GET POST>
require valid-user
</Limit>

===================================================

Hope that helps.

At 01:57 PM 4/9/2001 -0500, Boget, Chris wrote:
>> I know this has nowt to do with PHP so I'll keep it as short 
>> as possible.
>> My problem is, I'd like to get 404 error redirecting to work 
>> in IE under Apache. I've set the ErrorDocument in apache.conf 
>> and in .htaccess. It works in Netscape et al but not in IE.
>> IE seems to be issuing it's own error page. I know there must 
>> be a config somewhere other than the client side "Show friendly 
>> error messages", but can't seem to find it. I have RTFM and 
>> scanned the Web but still not found it. Hope you can help.
>> Once again I apologize for being Off Topic.
>
>Does someone have an example of how to do this within .htaccess?
>I've tried everything and all I ever get is an Internal Server Error
>when the .htaccess file is in place... :/
>
>Chris
>

............................................................................
Les Neste  678-778-0382  http://www.lesneste.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to