[development] Re: .htaccess patch for 404 of Non-drupal files

Ken Rickard agentrickard at gmail.com
Thu Aug 3 18:06:48 UTC 2006


I wrote that page, so I think the answer is a guarded 'yes.'

We did find some odd behavior when we turned the patch on, which is noted in
the Handbook page:


There is a known issue that occurs if you block .png files with this method.
It affects the system_test() function in system.module, which relies on a
phantom .png call to the directory '/system/test/'.


There may be other bugs caused by our original patch, so I think more
testing (especially on 4.7, since the patch was put in place for 4.6) is
definitely needed.

To make debugging easier, I have opened http://drupal.org/node/76928 and
attached the .htaccess file that we currently use.

I also had to modify function system_view_general() in system.module to
hard-code clean url settings, since the .htaccess rules broke Drupal's
clean_url checker.

- Ken Rickard

Date: Wed, 2 Aug 2006 23:13:38 -0400
From: "Khalid B" <kb at 2bits.com>
Subject: [development] .htaccess patch for 404 of Non-drupal files
To: development at drupal.org
       <4a9fdc630608022013k5b15ae14kdf2fc0195911e510 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

It is worth including the change in this page http://drupal.org/node/56773
to the standard .htaccess we distribute?

This has two advantages:

a) Avoid a Drupal bootstrap for every 404 of these files.
b) Send a smaller number of bytes when this happen.

I believe the majority of sites would not want Drupal to handle 404 for

I can make the patch if it has a chance of getting through.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20060803/a4bd9119/attachment.htm

More information about the development mailing list