In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "Linux how to achieve 301 redirection and pseudo-static method", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Linux how to achieve 301 redirect and pseudo-static method" this article.
Use PW to do a new station, record examination and approval, Baidu, Google have also been included. But there is a problem is that Baidu does not have the webmaster tool like Google, which can set up the main domain name, and all the domain names with www and without www are included, resulting in the website weight being too scattered; when making links with webmaster friends, they are mostly reluctant to exchange, because it is a new site, there are not many included pages, and the weight is too scattered. The best way to refocus the weight is to set up a primary domain name and do 301 permanent redirection. Assuming that the domain name with www is the primary domain name, redirect the domain name without www to the domain name with www.
Since the new site is made of PW, some netizens have introduced that 301redirection may be achieved through the ghoble.php (root directory of the website) file under PW. The ghoble.php code is as follows:
Under the following code:
Add the following code:
But after a period of time, Baidu still includes web pages without WWW, it is possible that ghoble.php files can achieve 301 function, but Baidu does not recognize it? The host is the linux host, and another way is to achieve 301redirection by modifying the .htaccess file. It turns out that the pseudo-static is done through the .htaccess file, with the following code:
-We did not find out how to achieve both 301 redirection and pseudo-static through .htaccess files on the Internet. First, we backed up the original .htaccess (very important). After several experiments, we finally succeeded. The code is as follows:
After a period of time, Baidu only included domain names with www.
These are all the contents of the article "how to implement 301 redirects and pseudo-static methods in Linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.