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

One comment on “Auto redirect with javascript

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s