打開apache的配置文件httpd.conf 1.把#LoadModule rewrite_module modules/mod_rewrite.so前面的#去掉。 2.找到 # # 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 None 把 AllowOverride None 改為 AllowOverride All 最后就是重啟一下apache服務(wù)器使配置生效,這樣就支持.htaccess文件了
ErrorLog logs/error_log.log #錯誤日志 CustomLog logs/custom.log common #用戶日志 <Directory “D:/Inetpub/www/maidou/”> Options Indexes FollowSymLinks AllowOverride All #AllowOverride指明Apache服務(wù)器是否加載.htacess Order allow,deny Allow from all < /Directory>