Hi.

I'd like to be able to access, with the browser, a couple folders in the same domain as the drupal installation:

i.e.
http://www.bignyc.org/stats/
or
http://www.bignyc.org/customers/

but drupal seems to treat them as url aliases.
is there any way to exclude specific paths from being read in this way?
maybe this involves moving the drupal installation to its own folder?
thanks!

Comments

markdionne’s picture

This kind of problem has been driving me nuts.

I just found the answer here: http://drupal.org/node/117849

Another issue: when you refer to relative paths in HTML, when do you start with a / and when not? I find that in most situations it doesn't matter, often you will get problems with no initial /, but some places you can't have a slash.

BTW, moving Drupal to a folder can be painful if you have a lot of hand coded links to the files directory since they may need editing.

-mark

ndevelder’s picture

The answer is here:

http://drupal.org/node/30334

To paraphrase the thread:
There are two scenarios, and both involve modifying the .htaccess file IN THE SUBDIRECTORY

One: If you do not require .htaccess authentication
Simply add to the subdirectory .htaccess the two following lines:

Options +Indexes
DirectoryIndex index.html(or whatever you want your initial page to be)

Two: If you do require .htaccess authentication
Simply add the following three lines

ErrorDocument 401 "Unauthorized
Options +Indexes
DirectoryIndex index.html(or whatever you want your initial page to be)

ALSO : reposted from a long thread
----------------------------------------------------------------------------------------------
fixed (for me anyway)
leff - March 28, 2006 - 09:06

huge wrong post removed for brevity...

I think I fixed it. And it's so simple.

In perusing the logs I found this:
details
Type page not found
Date Tuesday, March 28, 2006 - 08:54
User jason
Location /toolbox/
Message 401.shtml not found.
Severity warning
Hostname ...

So I created a 401.shtml in my web root (with some valid html content). now I get the login prompt and everything works.

Notes.
* if you cancel or otherwise fail to log in the contents of 401.shtml will be displayed.
* the name of the file (401.shtml) might be different for you (it's up to your web host admin). So try logging in, then check the drupal admin page to see what file is missing.
* you might be able to change what file it looks for in your .htaccess file (to use a php file for instance). but I haven't tried it.

--------------------------------------------------------------------------------------------------------

Note: my missing file was called failed_auth.html - without this file, I couldn't access my hosts web statistics
but after it was made (xhtml file with simple text auth message) everything worked fine!