1、模块开启了
LoadModule rewrite_module modules/mod_rewrite.so
2、支持htacces文件配置
<Directory />
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
<Directory "D:/phpStudy/Apache/cgi-bin">
AllowOverride All
Options None
Require all granted
</Directory>
3、伪静态配置文件
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php
</IfModule>
LoadModule rewrite_module modules/mod_rewrite.so
2、支持htacces文件配置
<Directory />
Options +Indexes +FollowSymLinks +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
<Directory "D:/phpStudy/Apache/cgi-bin">
AllowOverride All
Options None
Require all granted
</Directory>
3、伪静态配置文件
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php
</IfModule>