From e9a3d79f62c5213fedeba59af69016e938474bf9 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 29 Oct 2011 22:07:37 +0000 Subject: [PATCH] Suggest RewriteEngine in sample config instead of ErrorDocument to get correct status headers and short-circuit some cases (e.g. apache not bothering to hit thumb_handler for bogus urls). --- thumb.config.sample | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/thumb.config.sample b/thumb.config.sample index 97cb9224e2..84445c1681 100644 --- a/thumb.config.sample +++ b/thumb.config.sample @@ -14,7 +14,12 @@ if ( !defined( 'THUMB_HANDLER' ) ) { * 1) Copy this file to thumb.config.php and modify the settings. * 2) The webserver must be setup to have thumb-handler.php as a 404 handler. * This can be done in apache by editing .htaccess in the /thumb directory by adding: - * ErrorDocument 404 /path/to/thumb_handler.php + * + * RewriteEngine on + * RewriteCond %{REQUEST_FILENAME} !-f + * RewriteCond %{REQUEST_FILENAME} !-d + * RewriteRule ^([^/]+/)?[0-9a-f]/[0-9a-f][0-9a-f]/[^/]+/[^/]+$ /path/to/thumb_handler.php [L] + * */ $thgThumbUrlMatch = array( -- 2.20.1