FreeKB - HTML 302 redirect from one web page to another web page
HTML - 302 redirect from one web page to another web page

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 +

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter e882b in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |