rewrite rule的.htaccess設定,將目錄的index.php對應至/

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

步驟如上。這時輸入網址,應該可以將原本的domain.com/index.php去掉,只要domain.com/ 就可以執行index.php了。