JavaScript Redirect Page

 JavaScript Redirect Page:-


Using JavaScript Code We can Redirect One Website to Another Website.Here I discuss about How to Redirect One Website to Another.

How to Redirect One Website to 

another Website:-


  • Login on Blogger.com
  • Goto Theme Section and Click on Three Dots 
  • Click On Edit HTML then click on the Code 
  • Search (Press CTRL+F) and type </head>
  • After getting this, copy below code and paste it before </head>

To Redirect Whole Website:


<script type='text/javascript'>

var d='<data:blog.url/>';
d=d.replace(/.\/\/[^\/]/, '');
location.href = "https://new website url";
</script>

To Redirect Particular Blog Post or Url:


<script>
if(window.location.href == "https://post website url")

{
window.location="https://new post website url";
}
</script>

    • Save the Theme and view Blog
    • Done


    This post is related to-

    redirect javascript
    javascript redirect to url
    javascript redirect to another page
    js redirect to url
    how to redirect to another page in html
    javascript redirect page




      Post a Comment

      0 Comments