Здравствуйте!
Не работает короткая ссылка 
https://site.ru/wiki/Файл:Ab78.png
Так работает 
https://site.ru/m/index.php5?title=Файл:Ab78.png
Настройки:
location /m/ {
                     index index.php5;
                    location ~ \.php5?$ {
                                include /etc/nginx/fastcgi_params;
                                fastcgi_pass  unix:/var/run/php5-fpm.sock;
                                fastcgi_index index.php5;
                                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                                fastcgi_param PHP_VALUE "mbstring.func_overload = 0";
                      }
             }
                location /wiki {
                        index index.php5;
                        rewrite "^(wiki)$" $1/ permanent;
                        rewrite "^/wiki/([^?]*)(?:\?(.*))?" /m/index.php5?title=$1&$args last;
                }
$wgScriptPath = "/m";
$wgArticlePath = "/wiki/$1";  
$wgUsePathInfo = true;        
$wgScriptExtension = ".php5";