CN103002063B - A kind of DNS of utilization realizes the method and system that URL forwards - Google Patents

A kind of DNS of utilization realizes the method and system that URL forwards Download PDF

Info

Publication number
CN103002063B
CN103002063B CN201210461438.0A CN201210461438A CN103002063B CN 103002063 B CN103002063 B CN 103002063B CN 201210461438 A CN201210461438 A CN 201210461438A CN 103002063 B CN103002063 B CN 103002063B
Authority
CN
China
Prior art keywords
url
data
forwarding
dns
forwards
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210461438.0A
Other languages
Chinese (zh)
Other versions
CN103002063A (en
Inventor
齐超
肖建芳
陈红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Internet Network Information Center
Original Assignee
Computer Network Information Center of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Computer Network Information Center of CAS filed Critical Computer Network Information Center of CAS
Priority to CN201210461438.0A priority Critical patent/CN103002063B/en
Publication of CN103002063A publication Critical patent/CN103002063A/en
Application granted granted Critical
Publication of CN103002063B publication Critical patent/CN103002063B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present invention provides a kind of DNS of utilization to realize the method and system that URL forwards, the system that arranges is forwarded to obtain the url data needing to forward of user's input from WEB data terminal by URL, and it is carried out verification of correctness, by legal A record data and corresponding forwarding record data being saved in after checking the data base of DNS, and update the resolution file in the resolution server of DNS.When browser end user access originator address, source address is directed to URL forwarding server end and makes a look up by the URL forwarding server of the present invention, and according to forwarding record data, source address is jumped to corresponding destination address by A record data, to realize URL forwarding.The present invention uses the mode of dns resolution by source address and the destination address of forwarding and forward type to be persisted in the data base of DNS and update the resolution server to DNS, will realize the operation simplification of URL forwarding, and ensure that the correctness of operation.

Description

A kind of DNS of utilization realizes the method and system that URL forwards
Technical field
The present invention relates to the method and system that a kind of URL forwards, be specifically related to a kind of DNS of utilization and realize the method and system that URL forwards.
Background technology
DNS(DomainNameSystem, domain name system) it is important the Internet infrastructure, including can be by domain name and IP(InternetProtocol, Internet protocol) distributed data base mutually mapping of address, and realize domain name and the software system of IP address translation feature that network can identify.DNS contains for the grammer according to the host name used on a kind of hierarchy definition Internet, the also authorization rule of name, and in order to define name and the correspondence of IP address, system needs all settings carried out.It practice, DNS is a distributed data base.It allows the various piece of whole data base carries out local control;The most whole network also can access the data of each part by Client/Server.
URL forwards the special setting referred to by server, and the user accessing current domain name is directed to the network address specified.In existing URL forwards and realizes, website webmaster or domain name holder are often by the configuration of amendment server end, or add in web page code and redirect the mode of statement and realize.
In prior art, forward if it is desired to realize URL, such as wish to jump to domain name abc.com without www from domain name www.abc.com of band www by 301 redirections, it usually needs to apache server under Mod-Rewrite pattern, by .htaccess file addition code below:
Options+FollowSymLinks
RewriteEngineon
rewritecond%{http_host}^abc.com[nc]
rewriterule^(.*)$http://www.abc/$1[r=301,nc]
Wherein r=301, represent 301 redirection, if 302 types then write r=302.And IIS server is arranged as follows firstly the need of on backstage:
File or folder-> right button that management backstage-> selection is to be redirected " is redirected to URL "-> inputs target URL-needing to turn to > select " the permanent redirection of resource ".
If needing to realize 301 or 302 redirections to also need to support ISAPI_Rewrite, and it being modified, the amendment code of ISAPI_Rewrite3.x version is presented herein below:
RewriteCond%{HTTP:Host}^www\.farlee\.info$
RewriteRule(.*)http\://farlee\.info$1[NC,R=301]
According to the difference of ISAPI_Rewrite version, amendment code is also not quite similar, and does not enumerates.
Then need to build new WEB service, and in webpage, add redirection statement, add and redirect code.
Description how to build new WEB service is omitted below, only illustrates how to add in webpage to redirect code.Still, as a example by jumping to abc.com from www.abc.com, routine operation is the 301 redirection codes writing JSP or ASP language respectively.Under JSP 301 turn to code:
<%
response.setStatus(301);
response.setHeader("Location","http://abc.com");
response.setHeader("Connection","close");
%>
ASP.NET301 redirects code:
<scriptlanguage="c#"runat="server">
privatevoidPage_Load(objectsender,System.EventArgse){
Response.Status="301MovedPermanently";
Response.AddHeader("Location",http://abc.cn);
}
</script>
In above-mentioned URL forwards implementation, at least there are the following problems:
1. amendment configuration file, can increase the management cost of management personnel, and the amendment of different server operation difference, and modifying the configuration of server easily goes wrong.
2. add in webpage and redirect statement, this kind of mode needs again to build a set of WEB service for redirecting, so can increase the maintenance workload of attendant, if this server fail attendant fails to process in time in addition, it may appear that situation about can not access.
Summary of the invention
For solving the problems referred to above, the present invention uses DNS(DomainNameSystem, domain name system) mode that resolves is by the source address of forwarding and destination address and forwards type to be persisted in the data base of DNS and updates and arrives the resolution server of DNS, the operation simplification that URL forwards will be realized, and ensure that the correctness of operation.
The present invention provides a kind of DNS of utilization to realize the method that URL forwards, the system that arranges is forwarded to obtain the url data of user's input from WEB data terminal by URL, type is forwarded including forwarding source address, destination address and URL, and it is carried out verification of correctness, as verified whether source address and destination address exceed the scope of regulation, whether source address and destination address correspond with host name and URL address rule etc.;A record data are generated to being verified as correct url data, and this A record data are verified its legitimacy, by legal A record data and corresponding forwarding record data (being forwarded the system that arranges to generate by URL) being saved in after checking the data base of DNS, and update the resolution file in the resolution server of DNS.If A record data verification is illegal (if A records data and conflicts with having recorded or repeat), then this A record data is returned to URL and forward the page of the system that arranges, show error message, stop forwarding and arrange.
When browser end user access originator address, source address is directed to URL forwarding server end and makes a look up by the URL forwarding server of the present invention, according to forwarding record data, source address is jumped to corresponding destination address by pointing to URL forwarding server by A record data, to realize URL forwarding.Specifically, it is that record data are jumped to URL forwarding server end, then jumps to corresponding destination address again according to the forwarding type of user setup.
A (Address) record data are used to the IP address record data specifying host name (or domain name) corresponding.Website server under this domain name can be directed on the webserver of oneself by user.The subdomain name of domain name can also be set simultaneously.For popular, A record data are exactly the IP of server.Domain name binding A record data tell DNS exactly, when inputting domain name when, are conducted the A to being arranged on DNS and record the server corresponding to data.
The present invention also provides for a kind of DNS of utilization and realizes the system that URL forwards, and forwards including URL and arranges system, the data base of DNS and URL forwarding server;URL forwards the system that arranges to extract url data from WEB data terminal, generates A record data and forwards record data, preserve to the data base of DNS after verifying it;URL forwarding server obtains above-mentioned record data from the data base of DNS, and is directed to URL forwarding server, according to the forwarding type of user setup, source address jumps to corresponding destination address.
Described URL forwarding arranges system and includes data extraction module, data check module, data persistence module;Described data extraction module is responsible for obtaining url data from WEB data terminal and generating A record data;Described data check module is responsible for verifying the url data obtained and record data;Described data persistence module is responsible for all url datas through verification are persisted data base.
Described URL forwarding server includes parsing module and forwarding module;Source address is directed to URL forwarding server end and makes a look up by described parsing module;Described forwarding module forwards type to carry out adaptation according to the URL that user sets, and jumps to destination address.
Described parsing module judges whether that in search procedure URL forwards record;If it is present source address to be jumped to URL forwarding server;If it does not exist, then return browser end.
Compared with prior art, the present invention has only to the clear and definite source address of user and destination address can carry out URL and forward operation, it is not necessary to configure the server end of oneself website, it is not required that be modified the code holding website, not only make easy and simple to handle, ensure that the correctness of operation simultaneously.
Accompanying drawing explanation
Fig. 1 is the overall structure block diagram of this invention;
Fig. 2 is the overall flow figure of the present invention;
Fig. 3 is structure and the workflow diagram that URL forwards the system that arranges;
Fig. 4 is URL forwarding server structure and workflow diagram.
Detailed description of the invention
Below in conjunction with accompanying drawing, the present invention is further illustrated.
As it is shown in figure 1, the invention mainly comprises three parts: URL forwarding to arrange system, the data base of DNS and resolution server, and URL forwarding server.
As in figure 2 it is shown, the flow process of the present invention is:
1. fill in the url data needing to forward at WEB data terminal, including source address, destination address and forwarding type;
2.URL forwards the system that arranges to extract above-mentioned url data and verification from WEB data terminal, the correct url data after verification is generated A and records data;
3.URL forwards the system that arranges that above-mentioned A is recorded its legitimacy of data check;If A record data check is legal, URL forwards and arranges the corresponding record data that forward of system generation, and legal A record data and forwarding record data are all preserved the data base to DNS, and updates the resolution file in the resolution server of DNS;If A record data check is illegally, then illegal A record data is returned to URL and forward the page of the system that arranges, show error message, stop forwarding and arrange;
4. when user access originator address, URL forwarding server is the valid data in extraction step 3 from the data base of DNS, and source address jumps to URL forwarding server end, and URL forwarding server, according to the forwarding type of user setup, jumps to corresponding destination address;If there is not forwarding record, then direct access originator address.
With the domain name from band wwwwww.abc.comRedirect by 301 and jump to the domain name without wwwabc.comAs a example by, when fill in source address in WEB terminalwww.abc.com, destination addressabc.comIt is after 301 redirections redirect these url datas that need to forward with forwarding type, URL forwards the system that arranges to extract above-mentioned data from WEB data terminal, and carry out verification of correctness, i.e. verify that these url datas of input are the most legal: whether such as length is effective length, source address, destination address are the most legal, undesirable, point out corresponding information.
After above-mentioned data are verified as legal (being correct url data), URL forwards the system that arranges can automatically generate an A pointing to URL forwarding server and records data, whether this A record data that then URL forwards the backstage of the system that arranges to be generated by code verification have with the existing A record data in the data base of DNS is conflicted, have, be judged to illegal, return to URL and forward the page of the system that arranges, display error message, stops to forward setting.
If it is legal to input, and record and do not conflict, URL forwards the system that arranges to resolve to the data base of DNS and inserts solution new record data (i.e. A records data) in log, including: domain name ID, host name, circuit types, TTL is equivalent, it is used for pointing to url data forwarding server, and updates the resolution file in dns resolution server;Forward to the data base of DNS and log inserts forwarding record data, including: domain name ID, host name, forward type, source address, destination address etc., be used for generating skip instruction.
At browser end when user's access originator addresswww.abc.comTime, source address is directed to URL forwarding server end and makes a look up by the parsing module of URL forwarding server, and when there is URL and forwarding record, the forwarding module of URL forwarding server jumps to corresponding destination address according to solving new recordabc.com, to realize URL forwarding.
Use the mode of DNS service, it is only necessary to user fills in source address in WEB terminal and iswww.abc.com, destination address isabc.comAnd to select to forward type be 301 to reset, eliminate the troublesome operation of introduction in background technology.Certainly, if wanting, hiding other modes such as forwarding by 302 redirections or framed realizes forwarding, and also has only at forwarding type adjust accordingly.
From the foregoing, URL forwards, to arrange main function of system be to obtain the source address that will carry out URL forwarding filled in of domain name holder and destination address and forward type, persists after checking.As it is shown on figure 3, URL forwarding arranges system and is mainly made up of following module: data extraction module, data check module, data persistence module.
Data extraction module is mainly responsible for obtaining from WEB data terminal the URL of user's input and is forwarded data, including source address and destination address, and forwards type.
Data check module is mainly responsible for verifying the data extracted, including: whether source address and destination address be beyond the scope specified, whether source address and destination address correspond with host name and URL address rule, and whether the A record verifying qualified data genaration conflicts with having recorded or repeat.
Data persistence module is responsible for persisting (including solving new record and forwarding record data) above-mentioned valid data after verification the data base of DNS, and generates new resolution file, replaces original resolution file in the resolution server of DNS.
URL forwarding server major function is to obtain valid data in the data base's (database is called for short DB) from DNS, according to the forwarding type of user setup, generates and forwards statement accordingly, it is achieved source address jumps to corresponding destination address.As shown in Figure 4, URL forwarding server mainly includes two modules, parsing module and URL forwarding module.
Source address is directed to URL forwarding server end and makes a look up by parsing module, it may be judged whether there is URL and forwards record.If it is present source address to be jumped to URL forwarding server;If it does not exist, then return the page at source address place, i.e. browser end.
When there is URL and forwarding record, source address is intercepted by URL forwarding module, and the URL set according to user forwards type to carry out adaptation, jumps to the destination address that user sets.

Claims (6)

1. utilizing DNS to realize the method that URL forwards, forwarded by URL and arrange system, the data base of DNS and resolution server, and URL forwarding server realizes, described URL forwarding server includes parsing module and forwarding module;Step is:
A () URL forwards the system that arranges to obtain url data from WEB data terminal, described url data includes that URL forwards source address, destination address and URL to forward type;
B () URL forwards the system that arranges that above-mentioned url data carries out verification of correctness, and generate A record data to being verified as correct url data;
C () URL forwards the system that arranges to verify the legitimacy of described A record data, legal A record data and corresponding forwarding record data are all preserved the data base to DNS, and updates the resolution file in the resolution server of DNS;Illegal A record data are returned to URL and forwards the system that arranges, stop to forward setting;
D () is when user is from browser end access originator address, source address is pointed to URL forwarding server by the parsing module of URL forwarding server, URL forwarding server is made a look up by the forwarding record data relevant to source address in the data base of inquiry DNS, when data base existing URL and forwarding record, the forwarding module of URL forwarding server forwards forwarding type and the destination address of user setup in record according to the URL inquired, jump to corresponding destination address, it is achieved URL forwards.
2. the method for claim 1, it is characterized in that, in described step (b), the content of verification of correctness includes whether source address and destination address exceed the scope of regulation, and whether source address and destination address correspond with host name and URL address rule.
3. the method for claim 1, it is characterised in that if the A record data in described step (b) are conflicted with having recorded or repeated, be illegal.
4. one kind utilizes DNS to realize the system that URL forwards, it is characterised in that includes that URL forwards and arranges system, the data base of DNS and URL forwarding server;URL forwards the system that arranges to extract url data from WEB data terminal, generate A record data after it is verified and forward record data, preserve to the data base of DNS, described A record data include: domain name ID, host name, circuit types and TTL, described forwarding record data include domain name ID, host name, forwards type, source address and destination address;URL forwarding server obtains A from the data base of DNS and records data, record data according to A and source address is directed to URL forwarding server, URL forwarding server is made a look up by the forwarding record data relevant to source address in the data base of inquiry DNS, forward the forwarding type of user setup in record data according to inquire, source address is jumped to corresponding destination address.
5. system as claimed in claim 4, it is characterised in that described URL forwarding arranges system and includes data extraction module, data check module, data persistence module;Described data extraction module is responsible for obtaining url data from WEB data terminal and generating A record data;Described data check module is responsible for verifying the url data obtained and record data;Described data persistence module is responsible for all url datas through verification are persisted data base.
6. system as claimed in claim 4, it is characterised in that described URL forwarding server includes parsing module and forwarding module;Source address is directed to URL forwarding server according to the A record data obtained from the data base of DNS by described parsing module, and URL forwarding server is made a look up by the forwarding record data relevant to source address in the data base of inquiry DNS;Described forwarding module forwards the URL that in record, user sets to forward type and destination address to carry out adaptation according to the URL inquired, and jumps to destination address.
CN201210461438.0A 2012-11-15 2012-11-15 A kind of DNS of utilization realizes the method and system that URL forwards Active CN103002063B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210461438.0A CN103002063B (en) 2012-11-15 2012-11-15 A kind of DNS of utilization realizes the method and system that URL forwards

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210461438.0A CN103002063B (en) 2012-11-15 2012-11-15 A kind of DNS of utilization realizes the method and system that URL forwards

Publications (2)

Publication Number Publication Date
CN103002063A CN103002063A (en) 2013-03-27
CN103002063B true CN103002063B (en) 2016-08-03

Family

ID=47930196

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210461438.0A Active CN103002063B (en) 2012-11-15 2012-11-15 A kind of DNS of utilization realizes the method and system that URL forwards

Country Status (1)

Country Link
CN (1) CN103002063B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704502B (en) * 2017-08-28 2021-10-29 创新先进技术有限公司 Routing method, device, equipment and system
CN110535981A (en) * 2019-09-04 2019-12-03 达疆网络科技(上海)有限公司 A kind of URL repeater system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668050A (en) * 2008-09-07 2010-03-10 赵捷 Method and system for analyzing a domain name
CN102668518A (en) * 2011-12-02 2012-09-12 华为技术有限公司 Content distribution network routing method, system, and user terminal

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668050A (en) * 2008-09-07 2010-03-10 赵捷 Method and system for analyzing a domain name
CN102668518A (en) * 2011-12-02 2012-09-12 华为技术有限公司 Content distribution network routing method, system, and user terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DNAME Redirection in the DNS;S. Rose等;《RFC6672》;20060630;第5-6页 *

Also Published As

Publication number Publication date
CN103002063A (en) 2013-03-27

Similar Documents

Publication Publication Date Title
CN106612290B (en) Cross-domain single sign-on method oriented to system integration
CN106936853B (en) Cross-domain single sign-on method based on system integration-oriented cross-domain single sign-on system
CN106685998B (en) SSO authentication method based on CAS unified authentication service middleware
CN107277049B (en) Access method and device of application system
US9578123B2 (en) Light weight portal proxy
CN104735066B (en) A kind of single-point logging method of object web page application, device and system
CN102171984B (en) Service provider access
CN106209726B (en) Mobile application single sign-on method and device
KR102166589B1 (en) Method and apparatus for realizing communication between web page and native application, and electronic device
US20100049790A1 (en) Virtual Identity System and Method for Web Services
CN104038503A (en) Cross-site logging method, cross-site logging device and cross-site logging system
WO2013143403A1 (en) Method and system for accessing website
CN104506510A (en) Method and device for equipment authentication and authentication service system
CN102682009A (en) Method and system for logging in webpage
CN107948148B (en) Method and device for simulating replacement filling
CN104394133A (en) Login method and login system
CN104618449A (en) Web singe-point login implementing method and device
CN109067789A (en) Web vulnerability scanning method, system based on linux system
CN104079683B (en) A kind of authoritative domain name server directly in response to domain name analytic method and system
CN104660409A (en) System login method in cluster environment and authentication server cluster
CN105072123A (en) Single sign on log-out method and system under cluster environment
CN104717284A (en) Menu management method, device and system
CN104219080A (en) Method for recording logs of error pages of websites
CN106169963A (en) The access method of service page and system, proxy server
CN110708313B (en) System supporting multi-mode single sign-on

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210226

Address after: 100090 room 506, building 2, courtyard 4, South Fourth Street, Zhongguancun, Haidian District, Beijing

Patentee after: CHINA INTERNET NETWORK INFORMATION CENTER

Address before: 100190 No. four, 4 South Street, Haidian District, Beijing, Zhongguancun

Patentee before: Computer Network Information Center, Chinese Academy of Sciences