【发布时间】:2011-05-08 07:28:45
【问题描述】:
我想知道301 redirect 是否可以在专门的 html 静态 nginx 服务器中使用?
我知道通常不可能只在 html 中进行重定向。在 apache 服务器中,可以使用.htaccess 进行重定向。我想知道在nginx中是否也有类似的方法?
【问题讨论】:
-
仅在 HTML 中重定向,如果绝对没有其他选择:
<meta http-equiv="Refresh" content="0;url=http://domain-you-wish-to-redirect-to.com/">. -
谢谢!你为什么说“如果绝对没有其他选择”?这是一个坏方法吗?
标签: html redirect nginx http-status-code-301