ci框架初始路由需要有一个index.php

http://www.****.com/index.php/email/send163
http://www.****.com/email/send163

我想把index.php去掉,但是网上找到的方法设置 很多行不通 . 
经过摸索总结如下:

1.首先找到apache的配置文件. 
httpd.conf
搜索:LoadModule rewrite_module modules/mod_rewrite.so
如果前面有注释符号# 就去掉#注释.打开apache的rewrite规则
2.我的虚拟主机配置文件在vhost里面.(例如我用xampp安装的,我的vhost配置文件在httpd-vhosts.conf里面,这里的httpd-vhosts.conf文件名是在httpd.conf里面定义的自行寻找)
网上教程里面很多没有加入RewriteEngin on这一条(貌似有些主机不设置这个也可以)
但是以下两条必须要改成红色部分的内容
AllowOverride None
AllowOverride All
Require all denied
Require all granted
我的配置如下:
<VirtualHost *:80>
       DocumentRoot "/Users/mac/acodingnet/php_ci"
       ServerName "www.ci.com"
       <Directory "/Users/mac/acodingnet/php_ci">
        #RewriteEngine on
        # 如果请求的是真实存在的文件或目录,直接访问
        #RewriteCond %{REQUEST_FILENAME} !-f
        #RewriteCond %{REQUEST_FILENAME} !-d
        # 如果请求的不是真实文件或目录,分发请求至 index.php
        #RewriteRule . index.php
        #Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Require all granted
       </Directory>
</VirtualHost>

3.ci的config文件
$config['index_page'] = 'index.php';
$config['index_page'] = '';

4.在项目根目录创建文件(没有文件名,只有后缀的文件)          .htaccess
添加如下代码:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
 
#若你的项目名为:TestCI 则此处应为RewriteRule ^(.*)$ /TestCI/index.php/$1 [L]
</IfModule>
No input file specified. 问题解决!伪静态规则修改以后遗留问题