`
`
1.修改apche主配置文件 主要是
#LoadModule rewrite_module modules/mod_rewrite.so
改为
LoadModule rewrite_module modules/mod_rewrite.so
DocumentRoot "E:WWW" <Directory "E:WWW"> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
`
2.在web根目录中添加.htaccess文件,内容如下:
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] RewriteRule ^/(.*)$ /index.php?s=$1
下面是最简版本
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
`