第一步:確認網站開啟REWRITE規則 一般有兩種情況: i.apache安裝的時候已經包含rewrite功能 ii.后續配置的時候新添加mod_rewrite.so。這種情況需要在httpd.conf文件中修改配置啟動 在conf目錄下httpd.conf中找到 LoadModule rewrite_module modules/mod_rewrite.so 這句,去掉前邊的注釋符號“#”,或添加這句。 允許在任何目錄中使用“.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