If you’ve modified your own layouts and can’t see changes when you preview, it is because you need to copy … More
The location of documents and web pages can change. It’s a simple fact of life in the life of web developers. So how do you ensure that when a document has moved to a new address it can still be accessed?
1. Change the links from the old address to the new address
This seems evident but it’s not always done. Why? because it’s tedious and not always accurate. How can you be sure you haven’t missed a link?
2. Do a server redirect
The webserver can include an HTTP 301 response header pointing the browser to the new address. This can be achieved in a number of ways through server configuration files, .htaccess for example.
3. Script a redirection
If after all that people are still accessing the old document, let them know it has moved permanently at the old address. This can be done through a simple document:
This page has moved to a new location: https://lpicquet.wordpress.com/.
Please update your bookmarks and update your links.
The first step in the document is the meta header equivalent. It will force your browser to update the location after a period of time. I normally go for 4 seconds. Anything quicker and the user has not had a chance to the read the content of the page and would not appreciate the “flicker” effect. 5 seconds or more and it feels like nothing happens and the user may decide to click the link out of boredom.