Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure pseudo-static for virtual host

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

How do virtual hosts configure pseudo-static? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

For the complete pseudo-static rules of the page, the pseudo-static rules of each program will be different. It is recommended to directly use the integrated system rules provided by cloud service operators. In virtual hosts, whether Linux system or Windows system, complete pseudo-static rules are configured. If you need to configure them separately, you can put the configured rules in the corresponding file.

Startup step: enter the virtual host management center, find the pseudo-static settings in the basic functions section of the website, select the corresponding template, and confirm that the pseudo-static file can be generated.

Linux system, the pseudo-static rule file .htaccess provided by the program developer can be uploaded to the root directory of the website. If the program side does not provide an .htaccess file, create a new text file locally, add the Apache rules provided by the program side to the text, and upload it to the server and rename it to .htaccess.

The following are the pseudo-static setting rules for http pages to https pages under Linux+Apache

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 the apache substation inheriting the parent directory .htaccess from being affected. Please delete the comments yourself and do not put in the htaccess file RewriteRule ^ (. *) $https://www.abc.com/$1.

In Windows system, the general configuration file is web.config, which can be implemented by putting pseudo-static rules into web.config. Pseudo-static configuration rules for http pages 301 to https under Windows virtual hosts:

# www.abc.com should be changed to your own domain name. Please delete the comments by yourself. Do not put them into the web.config file to read the above contents. Have you mastered how to configure pseudo-static for virtual hosts? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report