canphp删除url地址中默认的index.php
首先必须保证apache开启路由重写功能;
然后新建一个.htaccess文件
内容为:
<ifmodule mod_rewrite.c> RewriteEngine on #RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </ifmodule>