Redirect an address with javascript

0

I have a url and every time the user types this url in the browser , I want it to be automatically directed to url and , how to do this with javascript or jQuery?

    
asked by anonymous 24.01.2018 / 13:00

1 answer

0

jQuery

$(document).ready(function(){ window.location.href ="url y"; });

JavaScript

<body onload="window.location.href = 'url y';">
    
28.01.2018 / 21:51