Php 带有锚点的MediaWiki URL截断URL
如果我尝试访问MediaWiki上的页面,其URL如下: URL被截断为: 我在IIS中运行并使用短URL。在我的LocalSettings.php中,我有Php 带有锚点的MediaWiki URL截断URL,php,iis,url-rewriting,mediawiki,Php,Iis,Url Rewriting,Mediawiki,如果我尝试访问MediaWiki上的页面,其URL如下: URL被截断为: 我在IIS中运行并使用短URL。在我的LocalSettings.php中,我有 $wgScriptPath = ""; $wgScriptExtension = ".php"; $wgArticlePath = "${wgScriptPath}/$1"; $wgServer = "https://www.mywiki.com"; $wgUsePathInfo = false; 我的web.config中有这样一条规则
$wgScriptPath = "";
$wgScriptExtension = ".php";
$wgArticlePath = "${wgScriptPath}/$1";
$wgServer = "https://www.mywiki.com";
$wgUsePathInfo = false;
我的web.config中有这样一条规则:
<rule name="wwwroot">
<match url="^(.*)$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?title={UrlEncode:{R:1}}" />
</rule>
我刚刚用UrlEncode包装了捕获组,但显然它不起作用。而且,奇怪的是,当我点击一个外部链接到
我可以看到浏览器转到正确的页面,但随后某个页面的某个部分会从URL中删除,浏览器会重定向到顶级页面。您尝试过吗?包含一些关于IIS的建议,但是没有开发人员使用IIS,因此没有人能够检查/修复它们。