1、httpd.conf配置文件中加载了mod_rewrite.so模块
2、AllowOverride None 将None改为 All
3、确保URL_MODEL设置为2
4、把下面的内容保存为.htaccess文件放到入口文件的同级目录下
这是我的 httpd.conf 配置
#LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule rewrite_module modules/mod_rewrite.so
#LoadModule sed_module modules/mod_sed.so
<Directory />
AllowOverride All
Require all denied
</Directory>
这是 httpd-xampp.conf 配置
Alias /xn "E:/WEB/xn/"
<Directory "E:/WEB/xn">
Options Indexes FollowSymli
#Options None
AllowOverride All
Require all granted
</Directory>
项目入口

以下是.htaccess文件内容
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
我的config.php

当我用URL访问的时候
http://127.0.0.1/xn/Admin/Public/login
ob
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
127.0.0.1
Apache/2.4.4 (Win32) OpenSSL/1.0.1e PHP/5.5.1
求大神帮看看我还少了什么,
