从文件夹将web.config重定向到$ _GET查询

阿尔乔姆·贡恰洛夫(Artyom Goncharov)

我想从重定向example.com/folderexample.com/file.php?url=folder通过web.config

我该怎么做?

张白兰

根据您的描述,我建议您首先安装url重写扩展名。网址:https//www.iis.net/downloads/microsoft/url-rewrite

然后,您可以使用以下url重写规则到web.config中以实现您的要求。

     <rewrite>
<rules>
            <rule name="Addquerystring" stopProcessing="true">
                <match url=".*" />
                <action type="Redirect" url="http://example.com/file.php?url={R:0}" appendQueryString="false" />

            </rule>
</rules>
     </rewrite>

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章