歡迎來到小豬圈!

2009-08-01

Apache HTTPD 預設的 .ht* 小技巧

  • httpd.conf 預設都有下列這一段,避免 .ht 開頭(無檔名)的檔案被讀取
    #
    # The following lines prevent .htaccess and .htpasswd files from being 
    # viewed by Web clients. 
    #
    <FilesMatch "^\.ht">
        Order allow,deny
        Deny from all
        Satisfy All
    </FilesMatch>
  • 雖然從網址無法存取,但依然可以從程式讀取。利用這一點,可以將設定檔取為 .htconfig 之類的。

No comments:

Post a Comment

Comment Form Message

標籤分類

Blog Archive

Labels

Google Analytics Tracking Code

About Me

My photo
Keelung, R.O.C, Taiwan
一個不學無術、混吃等死的傢伙…