From: Aaron Schulz Date: Sat, 29 Oct 2011 22:07:37 +0000 (+0000) Subject: Suggest RewriteEngine in sample config instead of ErrorDocument to get correct status... X-Git-Tag: 1.31.0-rc.0~26824 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=e9a3d79f62c5213fedeba59af69016e938474bf9;p=lhc%2Fweb%2Fwiklou.git 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). --- 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(