Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess在mediawiki中不工作_.htaccess_Mediawiki_Wiki - Fatal编程技术网

.htaccess在mediawiki中不工作

.htaccess在mediawiki中不工作,.htaccess,mediawiki,wiki,.htaccess,Mediawiki,Wiki,我在example.com上建立并运行了一个wiki。 当您转到该页面时,指向/index.php/Main_页面的URL中的链接会发生变化 我不想在主页上出现/之后的部分。还需要index.php 我的.htaccess rewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/(.*)$ wiki/index.php?

我在example.com上建立并运行了一个wiki。 当您转到该页面时,指向/index.php/Main_页面的URL中的链接会发生变化

我不想在主页上出现/之后的部分。还需要index.php

我的
.htaccess

rewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ wiki/index.php?title=$1 [PT,L,QSA]
RewriteRule ^/*$ wiki/index.php [L,QSA]
RewriteRule ^$ wiki/index.php [L,QSA]
在我的本地设置中

$wgScriptPath       = "/w";
$wgArticlePath = "/wiki/$1";

我的错误在哪里?我想不出来。。。我跟随mediawiki来到T.

您的三条重写规则相互矛盾,与$wgScriptPath不匹配。你的意思可能是:

RewriteRule ^/wiki/(.*)$ w/index.php?title=$1 [PT,L,QSA]
RewriteRule ^/*$ w/index.php [L,QSA]
更多信息,请参阅