Home > Web Front-end > Vue.js > body text

How to implement 301 jump through js code

小老鼠
Release: 2024-03-05 11:25:06
Original
774 people have browsed it

301 Jump method: "".

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>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!