”。"/> ”。">

Home >Web Front-end >Vue.js >How to implement 301 jump through js code

How to implement 301 jump through js code

小老鼠
小老鼠Original
2024-03-05 11:25:06801browse

301 Jump method: "cb07111ca5ae5ef678bbf0d01d0237c0 if (document.domain == ""yisu.com"") this.location = ""http://www.yisu.com" " this.location.pathname this.location.search; 2cacc6d41bbb37262a98f745aa00fbf0".

How to implement 301 jump through js code

Method to implement 301 jump through js code:

Use this JS code in the corresponding web page file 301 jump can be achieved, such as jumping a domain name without www to a domain name with www. The code is as follows:

<script language=javascript> 
if (document.domain ==""yisu.com"") 
this.location = ""http://www.yisu.com"" + this.location.pathname + this.location.search; 
</script>

The above is the detailed content of How to implement 301 jump through js code. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:The role of slot in VueNext article:The role of slot in Vue