admin管理员组

文章数量:1319953

I’ve never touched Google Cloud before (or any cloud infrastructure, for that matter) and now experimenting to use it to host a static website for a podcast. I have a setup similar to the one described in the Host a static website guide.

I managed to go through almost 99% of the project and it’s up and running on a test domain. The only things that I’m struggling to find any info or examples about are:

  • How to redirect www.example to example (redirect)
  • How to serve the /feed/index.xml when the /feed/ requested (rewrite, not redirect)

I can do this easily in nginx, for example:

server {
    server_name example;
    index index.html index.xml;
}

server {
    server_name www.example;
    return 301 $request_uri;
}

…but I’m struggling to achieve it using GC. I tried a lot of things and still can’t make it work. Any idea? Thanks!

本文标签: no wwwConfiguring index files and nowww redirects for a static website on Google CloudStack Overflow