最近在用slim, 有一些設定的問題,筆記一下
apache 設定 AllowOverride 一定要設為 All
RewriteEngine On
RewriteBase /api/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
RewriteBase 很重要
如果index.php不是放在根目錄,一定要加該檔案的目錄位置
最後執行 a2enmod rewrite 即可安裝完成
沒有留言:
張貼留言