Search code examples
htmlhttp-redirectnginxhttp-status-code-301

301 Redirect directly in HTML file with nginx


I wonder if 301 redirect is possible in an exclusively html static nginx server?

I know that normally it is not possible to make redirect work in html only. In apache server, it is possible to make redirect by using .htaccess. I wonder if there is a similar way of doing this in nginx too?


Solution

  • Have you tried this? I remember testing this quite a while back and it worked for me. Let me know if you are able to get it working or I'll test it on my end