只需完成以下两步,便可以开启Apache伪静态
修改配置文件httpd.conf
Step1:加载Rewrite模块
LoadModule rewrite_module modules/mod_rewrite.so
如果前面带#被注释了,取消注释
Step2:允许在任何目录中使用“.htaccess”文件,将“AllowOverride”改成“All”(默认为“None”)
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
重启。OK。