In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces Baidu https authentication tips: "Please redirect your http site 301 to the https site" how to do, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to know about it.
Recently want to transform a website into https access, but some are done, go to Baidu webmaster platform certification https, the result of how to submit is to appear "please redirect your http site 301 to https site", in Baidu webmaster community questions are not answered, and finally can only grope for themselves. Later found the reason: the original Baidu https authentication is strictly in line with the 301 redirection, I used iis6, the previous code is:
RewriteEngine OnRewriteCond% {SERVER_PORT}! ^ 443$ RewriteRule (. *) https://%{SERVER_NAME}/$1 [R]
Although this writing method can achieve all the http jump to https, but in Baidu webmaster platform is not through. Finally, the code was changed to the following and passed.
RewriteEngine OnRewriteCond% {SERVER_PORT}! ^ 443$ RewriteRule ^. * $https://%{SERVER_NAME}%{REQUEST_URI} [Lmaine Renew301]
Below I collected and sorted out a variety of website environment deployment https (ssl) after setting 301 jump code, I hope to be able to help you.
Linuxt system apache environment
CVM: create a new file under the root directory of the corresponding site (through ftp or log in to wdcp management panel: site list-control-enter public_html- to create a file) A file is named .htaccess.
Virtual host: you can enter the host management panel-File Management through ftp or login, enter wwwroot, create a new file named .htaccess file, and save it.
Edit the .htaccess file to write the following rules:
RewriteEngine OnRewriteCond% {HTTP:From-Https}! ^ on$ [NC] RewriteRule ^ (. *) $https://www.abc.com/$1 [Rend301 Magi L] # www.abc.com corresponding to your own domain name RewriteCond% {HTTP_HOST}! ^ www\. RewriteRule ^ (. *) $https://www.abc.com$1 [Rene301 Magi L] # www.abc.com is modified to your own domain name.
Nginx environment
Edit the nginx site profile (log in to the wdcp management panel: site list-tube-virtual host site file nginx- corresponds to the site profile) and add the following rules
Server {listen 80th serverSecretname abc.com;rewrite ^ (. *) https://www.abc.com$1 permanent; # abc.com corresponding to your own domain name}
Windows system II7 environment
CVM: create a new file under the root directory of the corresponding site (go directly to D:\ wwwroot\ site ftp named directory\ wwwroot after logging in or log in) A file is named web.config and edit and add the following rules:
# www.abc.com is modified to your own domain name.
Virtual host: you can go to the CVM management panel-File Management after logging in through ftp or log in, enter wwwroot, create a new file named web.config, and edit and add the following rules:
# www.abc.com is modified to your own domain name.
Windows system II6 environment
Configure a Rewrite and edit the Rewrite's rule file httpd.conf or .htaccess to add the following rules.
RewriteEngine OnRewriteCond% {SERVER_PORT}! ^ 443$ RewriteRule ^. * $https://%{SERVER_NAME}%{REQUEST_URI} [Lmaine Renew301]
Tomcat environment
Just add the following code before the last line of code in web.xml
SSL / * CONFIDENTIAL
Note: 1. When discuz forcibly redirects http to https using 301 mode, it will cause the background uc communication to fail.
2. After redirecting is set in this way, if the redirect cannot be accessed normally, please create a site-bound https domain name separately, and still set the redirection rule in the original site.
Thank you for reading this article carefully, I hope the editor to share the "Baidu https Certification Tips" Please redirect your http site 301 to the https site "how to do" this article is helpful, but also hope that you support more, pay attention to the industry information channel, more related knowledge waiting for you to learn!
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.