Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/240.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
Php 带有锚点的MediaWiki URL截断URL_Php_Iis_Url Rewriting_Mediawiki - Fatal编程技术网

Php 带有锚点的MediaWiki URL截断URL

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中有这样一条规则

如果我尝试访问MediaWiki上的页面,其URL如下:

URL被截断为:

我在IIS中运行并使用短URL。在我的LocalSettings.php中,我有

$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,因此没有人能够检查/修复它们。