Apache 移除 URL 中的 index.php

1.Apache开启mod_rewrite功能

2.根目录下新建 .htaccess文件并加上一些简单的规则就可以移除 index.php 

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

posted @ 2017-02-24 12:17  hell0x  阅读(135)  评论(0编辑  收藏  举报