最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

no www - Configuring index files and no-www redirects for a static website on Google Cloud - Stack Overflow

programmeradmin1浏览0评论

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!

发布评论

评论列表(0)

  1. 暂无评论