1. 將server根目錄的php5.ini (沒有就建立一個)裡加上這句
cgi.fix_pathinfo = 1
2. 修改protected資料夾下的.htaccess, 把內容改成下面這樣 (不要傻傻複製上下的米號ㄟ)
*******************************************
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
*******************************************
然後將這個檔案移到上一層目錄 (目錄的名稱就是你當初用yiic建立的專案名稱)
一切搞定!
PS:爬文+測試真的很花時間阿...
沒有留言:
張貼留言