我有一個工作網站,驗證/登錄使用.htaccess & .htpasswd。當試圖緩存它我得到的錯誤:如何緩存.htaccess&.htpasswd /授權需要離線
Application Cache Error event: Resource fetch failed (403) http://fman.cf/.htaccess
我不知道,如果他們是另一種具有脫機驗證,但這裏是我的Offline.appcache文件:
CACHE MANIFEST
# Cache Manifest Version: 1.0
# For Offline Usage
# Reminder: JQuery
CACHE
/Javascript.js
/Styles.css
/RPS.jpg
/RPS.html
/Miji.html
/Murderer.jpeg
/Lottery.png
/403.html
/404.html
/.htaccess
/.htpasswd
/.quarantine/*
/.tmb/*
NETWORK
*
FALLBACK
/404.html
# Last Update:
# 6/2/2015
的.htaccess :
# DO NOT REMOVE THIS LINE AND THE LINES BELOW ERRORPAGEID:asdfasdf
ErrorDocument 403 /403.html
# DO NOT REMOVE THIS LINE AND THE LINES ABOVE asdfasdf:ERRORPAGEID
# DO NOT REMOVE THIS LINE AND THE LINES BELOW ERRORPAGEID:adsfasdf
ErrorDocument 404 /404.html
# DO NOT REMOVE THIS LINE AND THE LINES ABOVE asdfasdf:ERRORPAGEID
AddType text/cache-manifest .appcache
# DO NOT REMOVE THIS LINE AND THE LINES BELOW PWPROTECTID:passblahblah
AuthType Basic
AuthName "Restricted Access"
AuthUserFile /home/myid/public_html//.htpasswd
Require user admin
# DO NOT REMOVE THIS LINE AND THE LINES ABOVE blablah:PWPROTECTID
htpasswd的:
USERNAME:MY_PASSWORD
注意:.htaccess中的所有註釋都放置在我的託管服務中,我確實將所有實際的數字/文字/密碼更改爲隨機內容。