In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article shows you how to bind a virtual host to a domain name, which is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
First of all, you need to confirm whether your virtual host is domestic or foreign. If it is domestic, you must record the domain name before binding.
How to bind a virtual host to a domain name? The first step is to enter the cloud service provider management center you purchased, click Virtual Host Management, select host domain name management, and enter the binding management interface.
Enter the domain name you need to bind, usually the first-level domain name and the second-level domain name with www. After entering, click add binding, and then resolve the bound domain name.
We use the virtual host management to explain in detail how the domain name is bound to the virtual host:
Log in to the member center, click "Virtual Machine Management" to enter the virtual host management interface, and then click "Management" of the corresponding host.
At this point, you can see all kinds of operations on the host, including "host domain name binding", "changing password", "host status setting" and other very detailed management operations. Here we only talk about "host domain name binding":
In the domain name binding management interface, in the input box, enter the domain name you own, one by one, and then click "add binding", and then click parsing, finish!
If the website is of HTTPS type, after the domain name is bound, it is recommended to redirect the access from HTTP to HTTPS, as well as the first-level domain name and the second-level domain name with www:
Go to the file management center, under the file root of the virtual host [wwwroot], locate the .htaccess file, and modify the original file to the following code:
# BEGIN WordPressRewriteEngine OnRewriteCond% {HTTP:From-Https}! ^ on$ [NC] RewriteCond% {HTTP_HOST} ^ (www.)? Domain name .com $[NC] RewriteRule ^ (. *) $https://www. Domain name .com / $1 [Renew301MagneL] RewriteCond% {HTTP_HOST} ^ account .gotoip55.com $RewriteRule ^ (. *) $https://www. RewriteBase / RewriteRule ^ index\ .php $- [L] RewriteCond% {REQUEST_FILENAME}!-fRewriteCond% {REQUEST_FILENAME}!-dRewriteRule. / index.php [L] # END WordPress
Description: put the domain name .com and www. Domain name .com jumps to https://www. Domain name .com, to prevent apache substations from inheriting the parent directory. Htaccess. In the above code, replace all the domain name .com with your own domain name.
Account .gotoip55.com is the assigned temporary call address, it is best to set the jump, otherwise there will be two places where the content is duplicated.
After this setting is set, the first-level domain name and the second-level domain name with www will be redirected to: https//www. Above the domain name .com
When operating, remember to back up the original .htaccess file first so that you can recover quickly when there is a problem.
The above content is how to bind a virtual host to a domain name. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are 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.