In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
How to redirect 301 to a CVM? Many novices are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can gain something.
CVM can be redirected to 301. In the control panel of the virtual host, there is a "301 turn" function, where we can set redirect 301 for the URL. Or find the configuration file directly in the virtual host file manager and do the 301 redirection rule.
301Redirection (or 301redirect, 301Jump) is one of the status codes in the header information (header) in the HTTP data stream returned by the server when a user or search engine sends a browsing request to the web server, indicating that the page is permanently transferred to another address. 301 redirect is mainly to redirect the URL that needs to be transferred to another new URL, and it is a permanent transfer.
We take Linux virtual host as an example to explain the method of cloud virtual host redirection 301:
If abc.com and www.abc.com, the two domain names, are unified to www.abc.com, the 301jump rule is established as follows:
RewriteEngine OnRewriteCond% {HTTP_HOST} ^ abc.com$ [NC] # abc.com is correspondingly modified to your own domain name RewriteRule ^ (. *) $http://www.abc.com/$1 [Run301Magi L]
Jump both abc.com and www.abc.com to: https://www.abc.com, then the established 301 turn rule is
RewriteEngine OnRewriteCond% {HTTP:From-Https}! ^ on$ [NC] RewriteCond% {HTTP_HOST} ^ (www.)? abc.com$ [NC] # Jump abc.com and www.abc.com to https://www.abc.com, to prevent apache substations from inheriting the parent directory .htaccess affected by RewriteRule ^ (. *) $https://www.abc.com/$1 [abc.com$ 301jL]
If you need to transfer multiple different domain names to one domain name, such as 123.com, and also to abc, the redirection rule for virtual host 301 is as follows:
RewriteEngine OnRewriteCond% {HTTP:From-Https}! ^ on$ [NC] RewriteCond% {HTTP_HOST} ^ (www.)? abc.com$ [NC] RewriteRule ^ (. *) $https://www.abc.com/$1 [Ranger 301 Magazine L] RewriteCond% {HTTP:From-Https}! ^ on$ [NC] RewriteCond% {HTTP_HOST} ^ 123.com $[NC] RewriteRule ^ (. *) $https://www.abc.com/$1 [Rene301MAL]
301 jump code copy, put into the root directory of the Linux virtual host .htaccess file, can be achieved. If you don't have this file in the root directory, you can create one yourself and name it .htaccess. In this way, the 301 redirection function will take effect, and we can verify whether it is automatically redirected by entering the relevant original domain name.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.