欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

yii框架配置路由的方法-創(chuàng)新互聯(lián)

小編給大家分享一下yii框架配置路由的方法,希望大家閱讀完這篇文章后大所收獲,下面讓我們一起去探討吧!

創(chuàng)新互聯(lián)企業(yè)建站,10余年網(wǎng)站建設(shè)經(jīng)驗,專注于網(wǎng)站建設(shè)技術(shù),精于網(wǎng)頁設(shè)計,有多年建站和網(wǎng)站代運營經(jīng)驗,設(shè)計師為客戶打造網(wǎng)絡(luò)企業(yè)風格,提供周到的建站售前咨詢和貼心的售后服務(wù)。對于做網(wǎng)站、網(wǎng)站建設(shè)中不同領(lǐng)域進行深入了解和探索,創(chuàng)新互聯(lián)在網(wǎng)站建設(shè)中充分了解客戶行業(yè)的需求,以靈動的思維在網(wǎng)頁中充分展現(xiàn),通過對客戶行業(yè)精準市場調(diào)研,為客戶提供的解決方案。

首先要在服務(wù)器配置(httpd.conf)中開啟重寫模塊:

#開啟重寫模塊,將其前面的#去掉
LoadModule rewrite_module modules/mod_rewrite.so
#Directory中允許覆蓋開啟
<Directory "${SRVROOT}/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # /tupian/20230522/core.html
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

(推薦教程:yii框架)

在目錄下加入服務(wù)器配置文件.htaccess

RewriteEngine on

###############################
# @email test@test.com
# @author test
###############################

#重寫規(guī)則
#如果是一個目錄或者文件,就訪問目錄或者文件
RewriteCond %{REQUEST_FILENAME} !-d

#如果文件存在,就直接訪問文件,不進行下面的RewriteRule
RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule . index.php

在框架配置項\frontend\config\main.php中加入urlManager配置項

'urlManager' => [
    'enablePrettyUrl' => true,
    'showScriptName' => false,
        //'suffix' => '.html',//URL后綴],

看完了這篇文章,相信你對yii框架配置路由的方法有了一定的了解,想了解更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝各位的閱讀!

新聞名稱:yii框架配置路由的方法-創(chuàng)新互聯(lián)
網(wǎng)站路徑:http://www.chinadenli.net/article40/igpeo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供響應(yīng)式網(wǎng)站云服務(wù)器網(wǎng)站導(dǎo)航關(guān)鍵詞優(yōu)化電子商務(wù)域名注冊

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

h5響應(yīng)式網(wǎng)站建設(shè)