Last updated December 18, 2007. Created by LeeHunter on May 19, 2007.
Edited by denney. Log in to edit this page.

When you create a subdirectory inside the main Drupal directory that requires authentication (with a .htaccess file), you may receive a "Page Not Found" Drupal page instead of the page you expect to receive from the subdirectory.

This is caused by the way Drupal handles unauthorised access to items. There is an easy fix to this problem. The following line should be added to the end of the .htaccess file in the subdirectory you are trying to access (NOT THE DRUPAL .HTACCESS FILE).

ErrorDocument 401 "Unauthorized"

Doing this rewrites the default 401 error so that it is not intercepted by Drupal.

Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.

Comments

Thanks! Works for D7 too.
Maybe there's a better way also, if so then maybe someone can post it.