久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

需要 web.config 文件而不是 codeigniter 的 .htaccess

Need a web.config file instead of .htaccess for codeigniter(需要 web.config 文件而不是 codeigniter 的 .htaccess)
本文介紹了需要 web.config 文件而不是 codeigniter 的 .htaccess的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我仍然無法讓 web.config 文件工作,無論我如何嘗試它仍然無法重定向到其他頁面.我正在使用 codeigniter 并在 IIS 平臺上托管應用程序,這里是我的 .htaccess 文件,請問有人可以將此代碼轉換為 web.config 嗎?

I still not able to get the web.config file working no matter how I try it still does not redirect to other pages. I am using codeigniter and hosting the application in IIS platform here is my .htaccess file, please can anyone convert this code to web.config?

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /travel/
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
  ErrorDocument 404 /index.php
</IfModule>

推薦答案

您的 web.config 文件應如下所示:

Your web.config file should look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
    <rewrite>
        <rules>
            <rule name="Index">
                <match url="^(.*)$"/>
                <conditions>
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
                </conditions>
                <action type="Rewrite" url="index.php/{R:1}"/>
            </rule>                
        </rules>
    </rewrite>
    <httpErrors>
        <remove statusCode="404" subStatusCode="-1" />                
        <error statusCode="404" path="/somedir/oops404.htm" responseMode="ExecuteURL" />                       
    </httpErrors>      
</system.webServer>

在 web.config 文件中未按原樣使用 RewriteBase,因此您可能需要相應地更改 URL 路徑.

RewriteBase is not used in web.config files as is, so you may need to change the URL paths accordingly.

這篇關于需要 web.config 文件而不是 codeigniter 的 .htaccess的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Action View Helper in Zend - Work around?(Zend 中的動作視圖助手 - 解決方法?)
Is this a good way to match URI to class/method in PHP for MVC(這是將 URI 與 PHP 中用于 MVC 的類/方法匹配的好方法嗎)
Where do I save partial (views) in Zend Framework, to be accessible for all Views in my App?(我在哪里保存 Zend Framework 中的部分(視圖),以便我的應用程序中的所有視圖都可以訪問?) - IT屋-程序員軟件開發技術
Having a single entry point to a website. Bad? Good? Non-issue?(有一個網站的單一入口點.壞的?好的?沒問題?)
Is MVC + Service Layer common in zend or PHP?(MVC + 服務層在 Zend 或 PHP 中常見嗎?)
Hello World example in MVC approach to PHP(PHP MVC 方法中的 Hello World 示例)
主站蜘蛛池模板: 国产精品欧美一区二区三区 | 欧美乱人伦视频 | 亚洲国产高清高潮精品美女 | 嫩草研究影院 | 天堂视频免费 | 日本精品视频一区二区 | 性高湖久久久久久久久 | 午夜大片 | 国产成人精品一区二区三区在线 | 九色视频网站 | 天天摸天天干 | 中文字幕第一页在线 | 日韩国产在线 | 色婷婷综合网 | 精品不卡| 国产精品久久久久久久午夜 | 精品视频在线一区 | 日韩一区在线观看视频 | 不卡一区二区三区四区 | 91伊人| 日本精品一区二区三区四区 | 久久草在线视频 | 秋霞精品 | 国产三区视频在线观看 | 韩国主播午夜大尺度福利 | 精品国产一区二区三区观看不卡 | 国产片一区二区三区 | 欧美一区二区三区高清视频 | 国产在线a | 人人干人人玩 | 毛片在线视频 | 成人av观看 | 久久免费视频1 | 91免费在线 | 老司机深夜福利网站 | 亚洲精品日日夜夜 | 亚洲视频免费播放 | 久久99深爱久久99精品 | 国产一区在线看 | 久久久99国产精品免费 | 成年无码av片在线 |