亚洲最大看欧美片,亚洲图揄拍自拍另类图片,欧美精品v国产精品v呦,日本在线精品视频免费

  • 站長資訊網(wǎng)
    最全最豐富的資訊網(wǎng)站

    yii怎樣去掉index.php

    yii去掉index.php的方法:1、開啟apache的mod_rewrite模塊,并重啟apache;2、編輯項(xiàng)目中的/config/web.php文件;3、在與index.php文件同級(jí)目錄下添加【.htaccess】文件。

    yii怎樣去掉index.php

    具體方法:

    (推薦教程:php圖文教程)

    1、開啟apache的mod_rewrite模塊

    • 去掉LoadModule rewrite_module modules/mod_rewrite.so前的“#”符號(hào)

    • 確保DocumentRoot "/Library/WebServer/Documents"<Directory "…"></Directory>中有“AllowOverride All”

    • 重啟apache,命令: sudo apachectl restart

    2、在項(xiàng)目中的/config/web.php中添加代碼:

    components'=>array(               ... 'urlManager' => [             'enablePrettyUrl' => true,             'showScriptName' => false,             'rules' => [                 '<controller:w+>/<action:w+>'=>'<controller>/<action>',             ],         ],             )

    (視頻教程推薦:php視頻教程)

    3、在與index.php文件同級(jí)目錄下(/web/)添加文件“.htaccess”,內(nèi)容如下:

    Options +FollowSymLinks IndexIgnore */* RewriteEngine on  # if a directory or a file exists, use it directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d  # otherwise forward it to index.php RewriteRule . index.php

    贊(0)
    分享到: 更多 (0)
    網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)