大家好,所以就我而言,我拥有的web.config文件会重写网址,以便显示http://www.site.com/page.php而不显示http://www.site.com/page,现在GET功能将无效。
以下是web.config的代码:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1">
<match url="^(|/)$" ignoreCase="false" />
<action type="Rewrite" url="index.php?url={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 2">
<match url="^([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" />
<action type="Rewrite" url="index.php?url={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 3">
<match url="^(.*)\.htm$" />
<action type="Rewrite" url="{R:1}.php" />
</rule>
<rule name="Imported Rule 4">
<match url="^(|/)$" ignoreCase="false" />
<action type="Rewrite" url="index.php?page={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 5">
<match url="^([a-zA-Z0-9_-]+)(|/)$" ignoreCase="false" />
<action type="Rewrite" url="index.php?url={R:1}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
关于如何允许PHP $ _GET函数的任何想法?
编辑:通过将appendQueryString =“false”更改为appendQueryString =“true”来修复 感谢您的帮助!
答案 0 :(得分:0)
这样做是因为“appendQueryString =” false “所以将属性更改为 true 修复了问题。