r101290 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101289‎ | r101290 | r101291 >
Date:22:07, 29 October 2011
Author:aaron
Status:ok
Tags:
Comment:
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).
Modified paths:
  • /trunk/phase3/thumb.config.sample (modified) (history)

Diff [purge]

Index: trunk/phase3/thumb.config.sample
@@ -14,7 +14,12 @@
1515 * 1) Copy this file to thumb.config.php and modify the settings.
1616 * 2) The webserver must be setup to have thumb-handler.php as a 404 handler.
1717 * This can be done in apache by editing .htaccess in the /thumb directory by adding:
18 - * ErrorDocument 404 /path/to/thumb_handler.php
 18+ * <IfModule rewrite_module>
 19+ * RewriteEngine on
 20+ * RewriteCond %{REQUEST_FILENAME} !-f
 21+ * RewriteCond %{REQUEST_FILENAME} !-d
 22+ * RewriteRule ^([^/]+/)?[0-9a-f]/[0-9a-f][0-9a-f]/[^/]+/[^/]+$ /path/to/thumb_handler.php [L]
 23+ * </IfModule>
1924 */
2025
2126 $thgThumbUrlMatch = array(

Status & tagging log