Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mediawiki's thumbnail handler (rewrite) doesn't work

My .htaccess:

RewriteEngine On
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
RewriteRule ^/?$ %{DOCUMENT_ROOT}/w/index.php [L]

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?w/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/w/thumb.php?f=$1&width=$2 [L,QSA,B] 

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?w/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/w/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]

index.php rewrite rule works, but thumbnail doesn't. If get thumb.php directly, it works:

thumb.php?f=test.jpg&width=180

So, the problem is in rewriting. I've tried many variants, but it still doesn't work. Where may be the mistake?


1 Answers

That because of images/.htaccess.

See Bug 65220.

like image 117
Artem P Avatar answered Jan 21 '26 08:01

Artem P