How to reduce import export costs-APP, download it now, new users will receive a novice gift pack.
win7 modifies the Host file to achieve domain name redirection,How to reduce import export costs the tutorial is simple and easy to understand. When developing and testing the website, sometimes it is necessary to simulate some different domain names for testing. , such as testing multiple subdomains or simulating access to different domain names. In order to achieve this purpose, it is necessary to modify the Host file locally and point the domain name to the local IP address, so as to achieve domain name redirection. This article will introduce how to modify the Host file under the Win7 system. I. What is a Host file? A host file is a plain text file that records the correspondence between the domain name and the IP address. When the computer requests a domain name,First, the local Host file will be found. If the corresponding IP address is found, the domain name will be resolved directly, otherwise the DNS server will be requested to resolve the domain name. Host files are generally stored under the C:\Windows\System32\drivers\etc path. II. Step 1 of modifying the Host file. To open Notepad, you first need to open Notepad with administrator rights. The method is: click the Start menu, enter "Notepad" in the search box, right-click "Notepad" in the program list, and select "Run as administrator". Two. Open the Host file in Notepad, select the "File" menu, and then select "Open". In the "Open" window, select "Local Disk (C:)" in "Computer", and then locate toC:\Windows\System32\drivers\etc folder, select the "All Files" file type and open the "hosts" file. 3. Add redirection rules to add domain names and IP addresses that need to be redirected at the end of the Host file, such as: 127.0.0.1 www.example.com127.0.0.1 blog.example.com1 27.0.0.1 dev.example.com Among them, 127.0.0.1 is the local IP address, www.example.com, blog.example.com, dev.example.Com is a domain name that needs to be redirected. Four. Save and close the file. After adding the redirection rule, save the file (select the "File" menu, and then select "Save") and close the notepad. 5. Clear DNS cache. Enter the ipconfig /flushdns command in the command line to clear the DNS cache. This command will refresh the DNS cache of the computer to make the modification take effect. So far, the modification of the Host file has been completed. Now open the browser and enter www.example.com, blog.example.com, dev.example.com and other domain names in the address bar. The browser will redirect these domain names to the local IP address. III. Precautions 1. The modification of the Host file will only affect the local computer, not on other computers.Two. The modification of the Host file will not affect the resolution of the DNS server, that is, if the IP address pointed to by the domain name in the DNS server is not the local IP address, the IP address pointed to by the DNS server will be accessed instead of the local IP address when the domain name is accessed on other computers. 3. When modifying the Host file, you need to operate carefully to prevent other problems caused by misoperation. If the network cannot be used after modifying the Host file, you can restore the Host file to its original state. Summary: Host file is a very useful tool that can help us develop and test websites locally. By modifying the Host file, the domain name can be redirected to the local IP address, so as to realize the conversion of domain name resolution. Modifying HWhen ost files, you need to abide by the operating specifications and be careful to avoid unnecessary problems.
Contact Us
Phone:020-83484669
Netizen comments More
2150 Comparative HS code duty analysis
2024-12-24 01:30 recommend
2435 How to comply with dual-use regulations
2024-12-24 00:57 recommend
122 Tobacco products HS code verification
2024-12-24 00:42 recommend
2236 HS code-driven export incentives
2024-12-23 23:10 recommend
414 Raw materials HS code intelligence
2024-12-23 22:56 recommend