【发布时间】:2012-01-14 06:43:59
【问题描述】:
可能重复:MediaWiki on SubDirectory and SubDomain(但没有答案,也没有任何回复提供帮助)
好的,我正在尝试将 MediaWiki 配置为安装到子目录。我之前已将它安装到 http://www.example.com/ 上的主域,并使用一个 mod_rewrite 使用 /wiki/Main_Title 的短 URL。
请注意,我也在HostGator 共享主机上,其中有special rules 用于短网址。
我的目录结构是这样的:
-
/(site root; location of .htaccess) -
/wiki/(mediawiki root; location of LocalSettings.php)
这是我尝试过的,
.htaccess:
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\&(.*)$ $1\%26$2
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^wiki/(.+)$ ./wiki/index.php?title=$1 [PT,L,QSA]
/wiki/LocalSettings.php:
## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
## For more information on customizing the URLs please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL
##
$wgScriptPath = "/wiki";
$wgScriptExtension = ".php";
$wgArticlePath = "$wgScriptPath/$1";
但是,我什么也没得到。我只是得到一个403/Forbidden 错误;没有 500 Internal Server Error,只是一个 403 - url http://www.example.com/。就好像什么事都没有做一样。我把头撞在墙上试图弄清楚这一点。任何帮助表示赞赏。
提前致谢!
【问题讨论】:
-
另外,如果需要更多信息,请询问,我会尽力提供您需要的任何信息。 :)
标签: apache mod-rewrite mediawiki subdirectory