我的Windows主机是:
127.0.0.1 example.com
我的代码可以正常使用:
http://example.com/index.php/home/myData/5
我正试图摆脱index.php
我在root上添加了.htaccess:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
并将我的application / config / config.php更改为
$config['index_page'] = ""
我的httpd.conf是:
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot C:\Users\Proxymis\Desktop\sites\example.com
ServerName example.com
<Directory C:\Users\Proxymis\Desktop\sites\example.com\>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
但是在尝试抓取http://example.com/home/myData/5
时
我收到404错误,apache日志显示:
[error] [client 127.0.0.1] File does not exist: C:/Program Files (x86)/EasyPHP-5.3.8.1/home/myData
我做错了什么?