【问题标题】:How to remove index.php in Codeigniter如何在 Codeigniter 中删除 index.php
【发布时间】:2011-01-18 15:51:13
【问题描述】:

如何在 Windows 7 和 IIS 上删除 codeigniter 中的 index.php。

我在网上搜索了解决方案,但结果是基于 Apache 的重写模块,如果有人在 IIS 和 Windows 7 上工作过并且有类似的情况,请帮助。

我想在 IIS 和 Windows 7 上工作,如果我可以在调用任何特定控制器/模块时删除 index.php。

【问题讨论】:

  • 如果这是一个生产盒,那么我不会把它放在 Windows 上太久。 Windows + PHP 充其量仍然不稳定并且有很多问题。最好转移到 linux 机器上进行生产。如果这只是为了开发,你应该没问题,但你可能想看看 XAMPP apachefriends.org/en/xampp-windows.html

标签: php iis codeigniter


【解决方案1】:

我会推荐IIRF (Ionic's ISAPI Rewrite Filter),它是 IIS 的重写器,与 ISAPI_Rewrite 不同,它完全免费提供全部功能。精简版的 ISAPI_Rewrite 可能足以解决这一问题(删除 CodeIgniter 的 index.php),但 IIRF 可以做的更多。

【讨论】:

    【解决方案2】:

    如果您在 IIS 下,您可以使用 ISAPI_Rewrite。访问该链接以获取有关它的更多信息。谢谢:)

    【讨论】:

    • @Viral 一旦你完成了这项工作,请确保你也将$config['index_page'] 设置为一个空白字符串!
    猜你喜欢
    • 1970-01-01
    • 2021-03-18
    • 2011-07-09
    • 1970-01-01
    • 2013-04-19
    • 2012-03-28
    • 2012-08-10
    • 2015-10-24
    • 1970-01-01
    相关资源
    最近更新 更多