Redirecting an html page to another html

I need to redirect the website to another website before it is shown. I tried using .htaccess, but that gives me problems. I also used javavscript and meta, but it does not work until the page I want to submit is loaded. to help?

+4
source share
3 answers

try this one

<meta http-equiv="refresh" content="N; URL=other-web-address"> 

where N is the approximate number of seconds you want the current web page to display before the browser automatically goes to another web address. If N = 0, the browser should immediately go to another web address.

Hope this solves your problem.

+7
source

put it

 <meta http-equiv="refresh" content="2;url=http://stackoverflow.com/"> 

in the html head tag (replace http://stackoverflow.com/ with url u want).

+3
source

Try it, it will definitely work !!! This does not allow the contents of your first page to be displayed, but it allows the user to directly go to the redirected page. Write this internal header tag after script type="text/javascript"

window.location="http://www.redirectedlocation.com";

0
source

Source: https://habr.com/ru/post/1339075/


All Articles