url中去掉index.php,方便redirect()

01 配置文件

return Array(
'URL_MODEL' => '2',
);

 

02

index.php入口文件下面加入文件 .htaccess -->使用editplus-->另存为

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>

 

03 修改 

nginx 下的配置文件 引入 mod_rewrite.so

posted @ 2016-05-28 15:44  小庄啊  阅读(610)  评论(0编辑  收藏  举报