Password Protected Directories and Textpattern 4

So I did end up having a few problems related to my upgrade to the latest version of Textpattern. One of the problems was that directories that I have password protected using .htaccess authentication had become inaccessible. If I tried to navigate to them I received a 404 error from Textpattern.

After a post of the Textpattern forums I received a response from wet who had run into the same problem. You can find his original post of the forums here, but here are the steps I took to fix the problem.

  1. Create a document on your server: Any name, any content, plain <html></html> suffices. Call the file onerror.html.
  2. Add these lines to the .htaccess found in the root of your Textpattern installation where “path_to_file” is the name of your subdirectory:


ErrorDocument 401 /[path_to_file]/onerror.html
ErrorDocument 403 /[path_to_file]/onerror.html

And that’s it. You’re done. Problem solved. Thanks wet!

Comments

15. January 2006

You’re welcome.

Sencer has just posted the solution into the Textpattern FAQs, too.

Add a comment

You may use textile in your comment. Gravatars are enabled. Your email will not be displayed and will remain private. I reserve the right to edit or delete comments.





Textpattern Solutions

Textpattern Solutions

Textpattern Solutions is the first book published on Textpattern.

details at friends of ED or the official book website.

buy it at amazon.com