如何重写codeigniter的Windows Azure上的index.php文件 [英] How to rewrite the index.php of Codeigniter on Windows Azure
本文介绍了如何重写codeigniter的Windows Azure上的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>
这篇关于如何重写codeigniter的Windows Azure上的index.php文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文