Why you would want to do this?
The easiest way to direct a web page to another page or a page on another website is to do and HTML Redirect. Most of the time I only use this method as a quick and temporary solution to a problem.
URL redirection is done for various reasons: for URL shortening; to prevent broken links when web pages are moved; to allow multiple domain names belonging to the same owner to refer to a single web site; to guide navigation into and out of a website; for privacy protection; and for hostile purposes such as phishing …(wikip)
A redirect is when a web page is visited at a certain URL, it changes to a different URL. For instance, a person visits “website.com/page-a” in their browser and they are redirected to “website.com/page-b” instead. This is very useful if we want to redirect a certain page to a new location, change the URL structure of a site, remove the “www.” portion of the URL, or even redirect users to another website entirely (just to name a few).
Let’s say we’ve just moved our website and we want to shut down the old one. However we don’t want all those pages from the old site to give a dreaded 404 Not Found. What we need is for those old links to redirect to the same content on our new site.
Here’s our example: we want old-website.com/blog/post
to redirect to new-website.com/blog/post
, along with all the other posts that use that same URL format. Also it would be nice if our redirects would report to search engines that this change is permanent so they should update accordingly. (css-tricks)
HTML Redirect Steps
- Past the following code into the <head> tag of your webpage or website (if you want to redirect your website.
<meta http-equiv="refresh" content="0; URL='http://new-website.com'" />
of course use the URL of the page/website you want to redirect to. - Test: Visit your old page and see if the page is directed to the new page.
Other methods to redirect a webpage is also available.
Visit css-tricks.com/redirect-web-page