gpt4 book ai didi

codeigniter - 如何在Windows Azure上重写Codeigniter的index.php

转载 作者:行者123 更新时间:2023-12-04 01:35:24 25 4
gpt4 key购买 nike

如何在 Windows Azure 和 IIS 上删除 codeigniter 中的 index.php?

我可以在没有特定模块的情况下重写 Codeigniter 的 index.php 的 URL 吗?

最佳答案

您可以在 web.config 文件中添加重写规则。将以下内容添加到 system.webServer 部分:

<rewrite>
<rules>
<rule name="Rule" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>

关于codeigniter - 如何在Windows Azure上重写Codeigniter的index.php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9965124/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com