1、配置 服务器
apache 打开 httpd.conf 文件 找到AllowOverride None 改为 AllowOverride All
2、在根目录建.htaccess文件,内容如下
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
</IfModule>