如何在 Windows Azure 上重写 Codeigniter 的 index.php [英] How to rewrite the index.php of Codeigniter on Windows Azure
本文介绍了如何在 Windows Azure 上重写 Codeigniter 的 index.php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 Windows Azure 和 IIS 上删除 codeigniter 中的 index.php?
How to remove index.php in codeigniter on Windows Azure and IIS?
我可以在没有特定模块的情况下重写 Codeigniter 的 index.php 的 URL 吗?
Can I rewrite the URL for the index.php of Codeigniter without a particular module?
推荐答案
您可以在 web.config 文件中添加重写规则.将以下内容添加到 system.webServer
部分:
You can add rewrite rules in your web.config file. Add the following to the system.webServer
section:
<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>
这篇关于如何在 Windows Azure 上重写 Codeigniter 的 index.php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文