Hello -

I would like to have just some static HTML content my site that is not rendered or messed with by Drupal. Permissions are not a concern (i.e. I don't mind if everyone can see this content)

I found the following forum links:
http://drupal.org/node/view/5055#7785
http://drupal.org/node/view/5022

But they didn't really answer the question I have, or at least I wasn't able to figure it out.

Right now, I'm using apache + drupal 4.3.2; it is installed at the top-level directory (i.e. in www/). When I add a new sub-directory (i.e. www/foo) and attempt to browse to this URL, drupal hijacks it and doesn't let me get to the content directly - it just sends me to the homepage of drupal.

Is there something I can do in .htaccess to allow direct access to content in a sub-directory? Or using drupal aliases? I saw something about URL aliasing in apache but I'm not sure how that would work. I can't put my content in a directory outside of drupal because I am already in the top-level directory.

thanks,
Karl

Comments

kbrown’s picture

However, this seems to work now. I didn't change anything (at least as far as I can tell), and if I reference a direct URL in a subdirectory, i.e. http://www.mysite.com/foo/bar.html, drupal doesn't munge the URL and the page loads just fine.

So, problem was solved by there being a lack of a problem to begin with. I'm still not sure why it wasn't working at first, but I now know why this does work. From .htaccess:

  # Rewrite URLs of the form 'index.php?q=x':
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

The first two RewriteCond{itions} mean: if the URL asked for is a directory or a file, do not apply the rule. So, if you ask for a directory or a file that exists on disk, it is not sent to the drupal engine. Very cool.

matt westgate’s picture

Comment out the following in your .htaccess file:

# Set some options
#Options -Indexes
#Options FollowSymLinks