Google cloud storage 从静态站点的url中删除/index.html
我在谷歌云存储桶上有一个静态站点 我使用以下命令将我的站点同步到存储桶:Google cloud storage 从静态站点的url中删除/index.html,google-cloud-storage,rsync,cp,gsutil,Google Cloud Storage,Rsync,Cp,Gsutil,我在谷歌云存储桶上有一个静态站点 我使用以下命令将我的站点同步到存储桶: args:[“-m”、“-h”、“内容编码:gzip”、“rsync”、“-c”、“-r”、“/folder”、“gs://mysite.com”] 我已在我的云存储桶中设置网站配置: /index.html 这导致: mysite.com/category/index.html 我想从中删除index.html,因此我在第二行中除了上面的args之外,还尝试了以下操作: args:[“-h”,“内容类型:text/htm
args:[“-m”、“-h”、“内容编码:gzip”、“rsync”、“-c”、“-r”、“/folder”、“gs://mysite.com”]
我已在我的云存储桶中设置网站配置:
/index.html
这导致:
mysite.com/category/index.html
我想从中删除index.html
,因此我在第二行中除了上面的args
之外,还尝试了以下操作:
args:[“-h”,“内容类型:text/html”,“cp”,““,”/folder/*/index.html”,“gs://mysite.com/*”]
但第二个args不起作用
如何编写第二个
args
,以便将index.html
从mysite.com/category/index.html
中的URL中删除?第二个args可能正在工作,问题是您正在使用哪个副本文件,所以您只需再次上传index.html
文件
如果要删除index.html
,必须使用:
args:[“-h”,“内容类型:text/html”,“rm”,“gs://mysite.com/category/index.html”]
这将删除我先前上载的带有/index.html的所有文件。如何只删除/index.html,但保留具有该扩展名的文件?我不明白你想说什么,每个文件夹只能有一个“index.html”文件,其他哪些文件正在被删除?我已经尝试了我发布的参数,他们只是删除了“category”文件夹中唯一的“index.html”文件,你能详细说明一下发生了什么吗?