Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/79.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
Google cloud storage 从静态站点的url中删除/index.html_Google Cloud Storage_Rsync_Cp_Gsutil - Fatal编程技术网

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”文件,你能详细说明一下发生了什么吗?