Auto redirect with javascript

 

To redirect all requests coming to a page to some other website use following java script.

Here I am trying to redirect all requests  coming to http://www.example.com/t.html to https://viewsby.wordpress.com

Add following JavaScript code in t.html:

<script language="javascript" type="text/javascript">
<!--
window.location="https://viewsby.wordpress.com";
// -->
</script>

-Sany

Advertisements