close

主要是參考這篇blog

1.一般都是使用.htaccess

首先要設定http.conf

AccessFileName .htaccess

Options FollowSymLinks
AllowOverride All

3.載入mod_rewrite以啟用RewriteEngine模組
sudo a2enmod rewrite

4.設定完重開apache2
sudo /etc/init.d/apache2 restart

5.在資料夾放入.htaccess檔案
設定轉換路徑
EX:
RewriteEngine On
RewriteBase /admin
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

arrow
arrow
    全站熱搜

    result945 發表在 痞客邦 留言(0) 人氣()