在WIN下 首先要载入URL_REWRITE模块
# 开启URL重写模块
LoadModule rewrite_module modules/mod_rewrite.so
要使APACHE支持 .htaccess 还要在对应的目录将
AllowOverride None
改为 All
测试: 在目录下新建一个 .htaccess 文件, 内容如下
RewriteEngine On
RewriteRule aa.html phpinfo.php
# 开启URL重写模块
LoadModule rewrite_module modules/mod_rewrite.so
要使APACHE支持 .htaccess 还要在对应的目录将
AllowOverride None
改为 All
测试: 在目录下新建一个 .htaccess 文件, 内容如下
RewriteEngine On
# let the server know that we were reached via /xyz and not
# via the physical path prefix /abc/def
#RewriteBase /
RewriteRule aa.html phpinfo.php