HTML - 302 redirect from one web page to another web page
by
Jeremy Canfield |
Updated: November 23 2020
| HTML articles
Let's say you have two web pages:
- www.example.com/foo.html
- www.example.com/bar.html
The following HTML can be used to redirect requests for www.example.com/foo.html to www.example.com/bar.html. This HTML markup would be placed in the <head> of foo.html.
<html>
<head>
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.example.com/bar.html">
</head>
</html>
The web servers access log should capture the 302 status, like this.
10.15.112.57 - - [10/Oct/2020:21:36:16 -0400] "GET /foo.html HTTP/1.1" 302 4153 130989 example.com +
Did you find this article helpful?
If so, consider buying me a coffee over at