Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess htaaccess密码保护_.htaccess_Cloud_Cache Control_.htpasswd - Fatal编程技术网

.htaccess htaaccess密码保护

.htaccess htaaccess密码保护,.htaccess,cloud,cache-control,.htpasswd,.htaccess,Cloud,Cache Control,.htpasswd,我有一个网站的开发版本,所以我使用密码保护。问题是我使用云来管理静态内容,比如图像。css、js等 Ste URL : http://www.example.com Static url: http://cdn.example.org 其中cd是“a”型条目。当我更新我的htaccess进行密码保护时,它会多次询问 AuthUserFile /var/www/html/example.com/.htpasswd AuthType Basic AuthName "My Secret Folder

我有一个网站的开发版本,所以我使用密码保护。问题是我使用云来管理静态内容,比如图像。css、js等

Ste URL : http://www.example.com
Static url: http://cdn.example.org
其中cd是“a”型条目。当我更新我的htaccess进行密码保护时,它会多次询问

AuthUserFile /var/www/html/example.com/.htpasswd
AuthType Basic
AuthName "My Secret Folder"
Require valid-user

那么如何删除statc域()的htpassword()

您可以按如下方式设置.htaccess:

SetEnvIfNoCase Host ^cdn\. CDN

AuthUserFile /var/www/html/example.com/.htpasswd
AuthType Basic
AuthName "My Secret Folder"
Require valid-user
Satisfy    any
Order      deny,allow
Deny from  all
Allow from env=CDN