【发布时间】:2015-08-17 02:32:23
【问题描述】:
我有一个使用 .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 中的所有 cmets 都是由我的托管服务放置的,我确实将所有实际数字/单词/密码更改为随机内容。
【问题讨论】:
标签: html .htaccess caching basic-authentication .htpasswd