Multiple domain name bindings a space does not affect
Source: Internet
Author: User
The first step: Create a Steering control page
Create the default home page file for the site (usually "index.asp" or "Default.asp") as follows:
<%
' Get the value of the HTTP input and pay the value to the Htost
Host=lcase (Request.ServerVariables ("Http_host"))
' Start condition jump
SELECT Case Host
' If the value of the host is www.abc0.com, select the event case ' www.abc0.com ' command
Case "Www.abc0.com"
' Below is the redirect command
Response.Redirect "Index_abc0.asp"
Case "Www.abc1.com"
' Below is the redirect command
Response.Redirect "Index_abc1.asp"
Case "Www.abc2.com"
' Below is the redirect command
Response.Redirect "Index_abc2.asp"
' Continue to add ...
Case "Www.abcn.com"
' Below is the redirect command
Response.Redirect "Index_abcn.asp"
' We Use the case ELSE to the fix any other requests
Case ELSE
Response.Redirect "Default.asp"
End SELECT
%>
Step Two: Create the appropriate file to be turned
Create "index_abc0.asp"-"index_abcn.asp", as the homepage of each website.
Step three: Resolve the IP address of multiple domain names to the same Web site space
For example, the IP address of the "www.abc1.com"-"www.abcN.com" is parsed into the "www.abc1.com" web space.
Step Fourth: Set up Web services for Web sites
Set the alias for the Web service to: "Www.abc1.com www.abc2.com www.abc3.com ... www.abcN.com" (Note: Separate a space before the alias)
Now you can use top-level URLs like "http://www.abc1.com" 、......、 "http://www.abcN.com" to access the same web space and get different first pages.
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