[support] support Digest, Vol 65, Issue 26

Tenant tenant at tenant.net
Mon May 19 10:15:23 UTC 2008


At 01:07 AM 5/19/2008, you wrote:
>This is incorrect. At least in the case of Apache and standard Drupal
>rewrite rules. Drupal doesn't look through directories for files to be
>served, Apache does, as it is the web server, Drupal is just the
>application running on top of it. All Drupal pages are served by
>accessing index.php, either directly in the form of example.com/
>index.php?q=node/12 or through an Apache rewrite rule that redirects
>requests such as example.com/node/12 to the former address. The way
>that the rewrites work, is that when a request to a file such as
>example.com/node/12 comes in, apache tries to find that file, if there
>is a directory called node, and a file in it called 12, then Drupal
>will never be bootstrapped, because Apaches rewrites files that it
>can't find, to Drupal. This is how the static files of Drupal are able
>to be served up.
>
>In short if you type in a URL to an existing file, Apache (or whatever
>webserver you are using) should serve it without bootstrapping Drupal.
>If it can't find that file, it will ask Drupal to bootstrap and return
>the corresponding content. If Drupal doesn't know a page at the
>request path, then it will return a 404.

Thanks for the reply, but I wasn't asking about Apache rewrites. I think the
question is more in the realm of what are the best practices for placing
existing html static files within a Drupal hierarchy? If I have an existing
site of several thousand static html files (which we do), should they all
be placed under /home/drupal/public_html/sites/mysite.com/files ? Or is
there a better way to do this?

If I do that then the URL becomes ugly and unwieldy, i.e.,
http://mysite.com/sites/mysite.com/files/contentfile.html

>So if you put static html throughout your Drupal directory, yes it
>will work, and the files will be served.
>
>One heads up before you start this, is that by default directory
>listing is disabled in .htaccess, and the only index handler enabled
>is index.php. If you want to send your users to example.com/some/
>static/directory/content/here/ and have the index.html, or index.htm
>file served automatically, then you will need to add that to the index
>handler section of your .htaccess.

Thanks for that tip.

I should not that when I first started tinkering with Drupal (4.7), I 
too an existing site and just overlaid Drupal on top of it. Most of 
the existing site stayed where it was directly under public_html and 
only newer stuff got put in the files directory. Yes, Drupal's home 
page took (index.php) took over from index.html, but that was OK and 
intended. I then used the Drupal home page menus to direct to 
existing pages of the old site. that worked fine and it gave us a new 
Drupal install going forward while allowing us to convert the old 
files to Drupal over time.

But that was with only one Drupal site. Once we got into ver. 5 and 
now ver. 6, newer sites are starting out with Drupal and we converted 
to the multi-site hierarchy, which is great.

So I'm really looking for a way -- with an existing large site -- to 
fold in Drupal into the multi-site hierarchy. Again, I hope I'm 
making this clear and thank you for your responses.



More information about the support mailing list