I am using 301 redirect to redirect my old website pages to the new site. The code for it as follows:
<%
response.setStatus(301);
response.setHeader( "Location", "http://my_new_website/page.html" );
response.setHeader( "Connection", "close" );
%>
So, whenever user reaches the old page, it will be automatically redirected to the new site page: http://my_new_website/page.html
Now I need a option like, during redirect from the old page to the new website, it must display an message something like "The website is moved" for a while and then automatically redirected the new website.
What should I do for this? Can anyone suggest a way for it?
Alternatively, you could immediately redirect your user to the new site and check the referrer
- if it is the old site, you could then present your user a message like "You have been redirected here because...".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With