久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

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

      ci框架如何去除index.php

      ci框架去除index.php的方法:首先打開apache的配置文件并修改;然后在CI的根目錄下建立“.htaccess”;接著修改內(nèi)容為“RewriteRule ^(.*)$ /CI/index.php/$1 [L]”;最后重啟即可。

      ci框架如何去除index.php

      推薦:《PHP視頻教程》

      去掉CodeIgniter(CI)默認(rèn)url中的index.php的步驟:

      1.打開apache的配置文件,conf/httpd.conf :

      LoadModule rewrite_module modules/mod_rewrite.so

      把該行前的#去掉。

      搜索 AllowOverride None(配置文件中有多處),看注釋信息,將相關(guān).htaccess的該行信息改為:

      AllowOverride All

      2.在CI的根目錄下,即在index.php,system的同級(jí)目錄下,建立.htaccess,直接建立該文件名的不會(huì)成功,可以先建立記事本文件,另存為該名的文件即可。內(nèi)容如下(CI手冊(cè)上也有介紹):

      RewriteEngine on    RewriteCond $1 !^(index.php|images|robots.txt)    RewriteRule ^(.*)$ /index.php/$1 [L]

      如果文件不是在www的根目錄下,例如我的是:

      http://localhost/ci_demo_1/index.php/

      第三行需要改寫為

      RewriteRule ^(.*)$ /CI/index.php/$1 [L]

      另外,我的index.php的同級(jí)目錄下還有assets文件夾,這些需要過濾除去,第二行需要改寫為:

      RewriteCond $1 !^(index.php|images|<span style="text-decoration: underline;">assets</span>|robots.txt

      3.將CI中配置文件(application/config/config.php)中

      $config['index_page'] = "index.php";

      改成

      $config['index_page'] = "";

      重啟apache,完成。

      php 框架ci去index.php的方法

      網(wǎng)上有很多方法都要引入.htaccess文件,如果是在測(cè)試環(huán)境下,動(dòng)態(tài)和靜態(tài)的文件放到一塊,可能測(cè)試會(huì)有一定的問題(由于全部定向到index.php),靜態(tài)網(wǎng)頁訪問不了。

      這里提供一種方法,只需要修改http.conf文件,

      步驟:

      1 :在配置虛擬目錄下加入

      <Directory />      Options Indexes FollowSymLinks      AllowOverride all      Order allow,deny      Allow from all    </Directory>    <IfModule mod_rewrite.c>     RewriteEngine on     RewriteRule ^/script/(.*) /script/$1 [L]     RewriteRule ^(.*)$ /index.php?/$1 [L]    </IfModule>

      2 將下面這行前面的;去掉

      LoadModule rewrite_module modules/mod_rewrite.so

      3 重啟apache就可以了,無需加入.htaccess文件

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