從安全性考慮,根目錄的allowoverride屬性一般都配置成不允許任何override ,即< directory />allowoverride none< /directory>在 allowoverride 設(shè)置為 none 時, .htaccess 文件將被完全忽略。當(dāng)此指令設(shè)置為 all 時,所有具有 “.htaccess” 作用域的指令都允許出現(xiàn)在 .htaccess 文件中。而對于 url rewrite 來說,至少需要把目錄設(shè)置為< directory /myblogroot/>allowoverride fileinfo< /directory>allowoverride的參數(shù):authconfig允許使用與認(rèn)證授權(quán)相關(guān)的指令(authdbmgroupfile, authdbmuserfile, authgroupfile, authname, authtype, authuserfile, require, 等)。fileinfo允許使用控制文檔類型的指令(defaulttype, errordocument, forcetype, languagepriority, sethandler, setinputfilter, setoutputfilter, mod_mime中的 add* 和 remove* 指令等等)、控制文檔元數(shù)據(jù)的指令(header, requestheader, setenvif, setenvifnocase, browsermatch, cookieexpires, cookiedomain, cookiestyle, cookietracking, cookiename)、mod_rewrite中的指令(rewriteengine, rewriteoptions, rewritebase, rewritecond, rewriterule)和mod_actions中的action指令。indexes允許使用控制目錄索引的指令(adddescription, addicon, addiconbyencoding, addiconbytype, defaulticon, directoryindex, fancyindexing, headername, indexignore, indexoptions, readmename, 等)。limit允許使用控制主機訪問的指令(allow, deny, order)。options[=option,…]允許使用控制指定目錄功能的指令(options和xbithack)??梢栽诘忍柡竺娓郊右粋€逗號分隔的(無空格的)options選項列表,用來控制允許options指令使用哪些選項。