gpt4 book ai didi

php - 从 windows azure 中的 codeigniter 中的 URL 中删除 index.php

转载 作者:行者123 更新时间:2023-12-02 04:32:51 25 4
gpt4 key购买 nike

我正在尝试在windows azure平台上开发网站。我想从我的 codeigniter 项目的 URL 中删除 index.php。

我在这里找到了 1 个解决方案:

Solution

但是,我不知道azure管理面板中的web.config文件在哪里?

谁能告诉我具体位置吗?我可以从他们的网站更改该文件吗?

谢谢。

最佳答案

此 web.config 应该与 codeigniter 一起使用。

只需创建一个名为 web.config 的文件并将其上传到 Azure 上的 wwwroot 文件夹(index.php 所在的文件夹)

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<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>
</system.webServer>
</configuration>

让我知道你过得怎么样!

谢谢

关于php - 从 windows azure 中的 codeigniter 中的 URL 中删除 index.php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22619614/

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