Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2005-12-20 11:41:38

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

Re: 404 error on password protected directories after 4.01 upgrade

As a side effect of debugging a rather unrelated phenomenon I got into trying to add an ErrorDocument (401, 403) /somefile.html directive to my .htaccess. Problem solved!

Three easy steps to happiness with password protected directories:

  1. Create a document on your server: Any name, any content, plain <html></html> suffices. Let’s call this file onerror.html for the moment.
  2. Add these lines:
    ErrorDocument 401 /[path_to_file]/onerror.html
    ErrorDocument 403 /[path_to_file]/onerror.html
    to the .htaccess found in the root of your Textpattern installation.
  3. There is no step 3.

Caveat: It still fails if you do not specify correct path names with trailing slashes, e.g. http://www.example.com/protected will fail, while http://www.example.com/protected/ will succeed.

Last edited by wet (2005-12-22 11:57:07)

Offline

#14 2006-01-18 18:22:32

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: 404 error on password protected directories after 4.01 upgrade

Wow!
Thanks, wet!

It seems you have found the solution to a very old problem.

I have followed your steps and it works like a charm, with no side-effects, at least, by now…

Thank you very much.

Last edited by maniqui (2006-01-18 18:22:50)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB