Welcome to W3Courses
 Like Us on Facebook

Redirect

Automatic Redirect using Javascript

You can redirect your users from the current page to a desired page using JavaScript. Please use the following code to do so:

 CODE
<script type="text/javascript">
<!--
window.location.href = "http://www.w3courses.com/"
//-->
</script>

Share

Redirect a Web Page Using a 301 Redirect and Preserve Search Engine Ranking

Suppose you have just redesigned some pages of your web site and change the web page name and locations. The pages have high search engine rankings that you don't want to lose. How can you safely redirect web site traffic from your old pages to the new pages without losing your rankings? You can do this by using a "301 redirect".

Share

Automatically Redirect from one Webpage to Another Webpage using JavaScript

Add the following code to the head section of your webpage to automatically redirect your users to another page.

<SCRIPT>
location.href = "http://www.w3courses.com"
</SCRIPT>
 

Share