欧美亚洲中文,在线国自产视频,欧洲一区在线观看视频,亚洲综合中文字幕在线观看

      1. <dfn id="rfwes"></dfn>
          <object id="rfwes"></object>
        1. 站長資訊網
          最全最豐富的資訊網站

          url index.php 怎么去掉

          去掉url index.php的方法:首先啟用mod_rewrite;然后創(chuàng)建htaccess文件,添加內容為“RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]”即可。

          url index.php 怎么去掉

          本文操作環(huán)境:windows7系統、PHP7.1版,DELL G3電腦

          移除 URL 中的 index.php

          默認情況下,你的 URL 中會包含 index.php 文件:

          步驟:

          1:啟用mod_rewrite:在Apache下找到conf下的httpd.conf文件,去掉:LoadModule rewrite_module modules/mod_rewrite.so前面的“#”符號;

          2:在 根目錄下的.htaccess文件中添加如下內容,如果沒有.htaccess文件,那么就手動創(chuàng)建一個文件。

          <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </IfModule>

          如果在Codeigniter根目錄下你添加了例如:css,js等文件夾,則要加上一句,如:

          <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond $1 !^(index.php|images|css|robots.txt)  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </IfModule>

          【推薦學習:PHP視頻教程】

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