List Info

Thread: 404 handling




404 handling
user name
2006-03-30 21:08:04
All-

We've been doing some heavy testing on 4.6 and found a piece that is good (I think) for all Drupal versions.

In .htaccess, Drupal's index.php file is defined as the default 404 handler.

This can cause real problems when an image or other file is missing,  A little research by our tech guys gives us this:

# This overrides the Drupal 404 handler for files that should never be handled by Drupal
<;FilesMatch "\.(gif|jpe?g|png|html|css|js)$"&gt;
  ErrorDocument 404 default
&lt;/FilesMatch>

This makes Apache handle 404 errors for typical html and image files.

Should this be submitted officially?

- Ken Rickard
agentrickard
404 handling
user name
2006-03-31 02:11:08
On 30-Mar-06, at 1:08 PM, Ken Rickard wrote:

> We've been doing some heavy testing on 4.6 and found a
piece that  
> is good (I think) for all Drupal versions.
>
> In .htaccess, Drupal's index.php file is defined as
the default 404  
> handler.
>
> This can cause real problems when an image or other
file is  
> missing,  A little research by our tech guys gives us
this:
>
> # This overrides the Drupal 404 handler for files that
should never  
> be handled by Drupal
> <FilesMatch
"\.(gif|jpe?g|png|html|css|js)$">
>   ErrorDocument 404 default
> </FilesMatch>
>
> This makes Apache handle 404 errors for typical html
and image files.
>
> Should this be submitted officially?

Yes....*any* idea should get "officially"
submitted as an  
issue...whether or not it gets applied is a separate issue
(i.e. this  
won't be applied in 4.6, will highly unlikely make it into
4.7).  
Standard procedure would be to submit an issue, then email
the dev  
list with a pointer for further comment if it is of wider
interest/ 
needs discussion.

Ken -- thanks for bring this up.

--
Boris Mann
Vancouver 778-896-2747 San Francisco 415-367-3595
SKYPE borismann
http://www.bryght.com

404 handling
user name
2006-03-31 05:03:54
Ken Rickard wrote:
> This can cause real problems when an image or other
file is missing,  A 
> little research by our tech guys gives us this:

What sort of real problems?

I tried adding this right after the original ErrorDocument
statement and 
saw no change. http://localhost/dru
pal/yarr.png was still served up with 
a 404 from Drupal.

And I think this is how it should be. All 404s are logged by
Drupal, 
which is a good thing. And all the 404 pages look the same,
also a good 
thing.

What am I missing?

-- 
Neil Drumm
http://delocalizedham.com/

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )