【问题标题】:301 Redirect directly in HTML file with nginx301 使用 nginx 直接在 HTML 文件中重定向
【发布时间】: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


【解决方案1】:

你试过this吗?我记得很久以前测试过这个,它对我有用。让我知道您是否能够使其正常工作,否则我将对其进行测试

【讨论】:

    猜你喜欢
    • 2010-10-30
    • 1970-01-01
    • 2014-04-21
    • 2020-10-29
    • 2016-10-24
    • 2018-08-14
    • 2015-08-11
    • 1970-01-01
    相关资源
    最近更新 更多