Apache 的 .htaccess 失效?

如果你的 Apache .htaccess 設定檔無效
請先檢查 httpd.conf 中的 <Directory>...</Directory> 中的
AllowOverride 設定是否為 None
改成 AllowOverrider All 就可以了

由於安全性等的考慮
Apache 可能預設會是 None
如果你只有某些地方需要支援 .htaccess 設定
可指定目錄支援即可
<Directory "/var/www/html">
AllowOverride All
</Directory>


參考來源:
[求助] Apache主機.htaccess強迫編碼設定

Comments

fdjkgh580 said…
This comment has been removed by the author.
Goodspeed said…
有幫到你就好 :)
fdjkgh580 said…
主網域支援
子網域卻沒辦法讀取.htaccess

解決方法原來是這樣,太感謝你了!

Popular posts from this blog

CentOS7 如何新增/移除 Rich Rule for firewalld

mac 安裝 mtr

Howto use Postman test Cors