Page redirection methods and redirection Methods
Recently, in the development project, my colleagues used CMS templates to build websites, but they didn't want users to access template files.
I have come up with several methods for this question. I will share these methods with you below.
I hope everyone will make persistent efforts to contribute their own efforts to the program.
I'm not talking nonsense.
JS to achieve page redirection
First:
<Script language = "javascript" type = "text/javascript">
Window. location. href = "http://shanghepinpai.com ";
</Script>
Second:
<Script language = "javascript">
Alert ("return ");
Window. history. back (-1 );
</Script>
Third:
<Script language = "javascript">
Window. navigate ("http://shanghepinpai.com ");
</Script
Fourth:
<Script language = "JavaScript">
Self. location = 'HTTP: // shanghepin#.com ';
</Script>
Category 5:
<Script language = "javascript">
Alert ("illegal access! ");
Top. location = 'HTTP: // shanghepin#.com ';
</Script> meta tag implementation in html
You only need to add the following sentence to the head. After staying on the current page for 0.1 seconds, you can jump to the target page.
<Meta http-equiv = "refresh" content = "0.1; url = http://jb51.net/"> php implementation <? Php
Header ("Location: http://jb51.net /");
?>