China Netcom Telecom's cheap solution

Source: Internet
Author: User
Tags microsoft frontpage
Some time ago Access We ServiceTool It was very slow, so I pulled the fiber of telecom. Now both the lines of China Telecom and China Netcom have IP addresses and gateways respectively, but I don't want others to use two addresses. Access Such as Sina, whether through China Telecom or China Netcom Access And the speed can be balanced.
Later, I consulted many people in the industry. The basic solution was to use CDN. Technology But because of the high cost, the company could not immediately approve it, so this solution gave up. Another solution is to use the dns acl and view as the China Netcom Telecom IP address. Automatic But because the operations are complex, and the North and South must be updated from time to time Network IP Database And finally gave up.
HTML solution:
Access through a default homepage User And then turn to different addresses to reach a relatively ideal speed.
Operation and implementation:
The following section describes Code Save the token as default.htm and put it in your root directory on the default homepage, Set This is the first access. Then the user will first access this File Then, a judgment is generated. The Telecom user points to the specified Telecom domain name, And the Netcom user points to the Netcom domain name.
The method is as follows: Resolve a domain name, such as www1.xxx.com to the IP address of China Netcom, resolve a www2.xxx.com to the Telecom IP address, and bind the two domain names to an Apache/ IIS . At this time, the two domain names access the same website, but it does achieve the effect of North-South traffic distribution.
First, log on to the background of the service provider that you purchased the Domain Name Management , Add a record and point to it. Then, return to your server and add the forward and reverse resolution.
WWW in a Netcom IP
Www1 in a Netcom IP
Www2 in a Telecom IP Address

China Netcom IP in PTR www.xxx.com
China Netcom IP in PTR www1.xxx.com
China Telecom IP in PTR www2.xxx.com

The default.htm file code is as follows:

Copy content to clipboard

Code:

<Script language = "JavaScript">
<! -- Hide

Function killerrors (){
Return true;
}

Window. onerror = killerrors;

// -->
</SCRIPT>
<Script language = JavaScript> var I = 1; <! --
If (top. location! = Location) top. Location. href = location. href;
Self. moveTo (0, 0 );
Self. resizeTo (screen. availwidth, screen. availheight );
// --> </SCRIPT>

<HTML> <Meta http-equiv = "Description" content = "automatic identification of China Netcom Telecom code">
<Meta http-equiv = "keywords" content = "automatic identification of China Netcom Telecom code">
<Title> automatic identification of China Netcom Telecom Code </title>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">

<Meta name = "generator" content = "Microsoft FrontPage 6.0">
<! -- 510510 page style definition -->
<Style>
Body {
SCROLLBAR-FACE-COLOR: # 6699ff;
SCROLLBAR-HIGHLIGHT-COLOR: # ffffff;
SCROLLBAR-SHADOW-COLOR: # ffffff;
SCROLLBAR-3DLIGHT-COLOR: # ffffff;
SCROLLBAR-ARROW-COLOR: # ffffff;
SCROLLBAR-TRACK-COLOR: # ffffff;
SCROLLBAR-DARKSHADOW-COLOR: # ffffff;
SCROLLBAR-BASE-COLOR: # ffffff;
}
</Style>

<Style type = text/CSS>
<! --
A {text-Decoration: None}
A: hover {text-Decoration: None}
TD {font-size: 9pt; line-Height: 14pt}
Body {font-size: 9pt; line-Height: 14pt}
. Style1 {color: # ffffff}
. Style2 {color: # 0472bc}
. Style3 {color: #00ff00}
Body, TD, Th {
Color: # 0472bc;
}
A: link {
Text-Decoration: none;
}
A: visited {
Text-Decoration: none;
}
A: active {
Text-Decoration: none;
}
-->
</Style>
<Meta http-equiv = "refresh" content = "30; url = *. htm">
</Head>
<NoScript> <IFRAME src = *. htm> </iframe> </NoScript>
<Script language = "JavaScript">
If (top. location! = Location)
Top. Location. href = self. location;
</SCRIPT>
<Center> <br>
<P>
Please wait and select the fastest site... </font> </P>
<P> </P>
If there is no response within 5 seconds, select the following entry and click to enter: <br> <p>
<A href = "http://www1.xxx.com/">
<Font color = "# ff0000"> → Netcom (applicable to users in North China) </font> </a>
<A href = "http://www2.xxx.com/">
<Font color = "# ff0000"> → China Telecom (applicable to users in the south) </font> </a> </font> </P>
</Center>
<SCRIPT>
I = 1
VaR autourl = new array ()
Autourl [1] = "http://www1.xxx.com/" // Netcom
Autourl [2] = "http://www2.xxx.com/" // China Telecom
Function auto (URL) {if (I) {I = 0; top. Location = URL }}
Function run () {for (VAR I = 1; I <autourl. length; I ++) document. write (" ")}
Run ()
</SCRIPT>
</Html>

When you access www.xxx.com, the fastest site is automatically selected based on your line type.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.