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]

原文地址:https://www.cnblogs.com/hell0x/p/6438012.html