CN109726344A - A kind of server end is to the method for being redirected to corresponding page after client identification - Google Patents

A kind of server end is to the method for being redirected to corresponding page after client identification Download PDF

Info

Publication number
CN109726344A
CN109726344A CN201811417243.XA CN201811417243A CN109726344A CN 109726344 A CN109726344 A CN 109726344A CN 201811417243 A CN201811417243 A CN 201811417243A CN 109726344 A CN109726344 A CN 109726344A
Authority
CN
China
Prior art keywords
resource
client
request
key
url
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.)
Withdrawn
Application number
CN201811417243.XA
Other languages
Chinese (zh)
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.)
G Cloud Technology Co Ltd
Original Assignee
G Cloud Technology Co Ltd
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 G Cloud Technology Co Ltd filed Critical G Cloud Technology Co Ltd
Priority to CN201811417243.XA priority Critical patent/CN109726344A/en
Publication of CN109726344A publication Critical patent/CN109726344A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The present invention relates to Website development technical fields, and in particular to a kind of server end is to the method for being redirected to corresponding page after client identification.The method of the present invention is that server end identifies the client device of request;It is returned and the matched page of client according to identification.The present invention solves the problems, such as that client accesses identical server page resource and returns to the page for being adapted to corresponding client, realizes the mobile terminal access end PC resource (or the end PC access mobile terminal resource) auto-returned mobile terminal (or the end PC) resource.

Description

A kind of server end is to the method for being redirected to corresponding page after client identification
Technical field
The present invention relates to Website development technical fields, and in particular to a kind of server end after client identification to being redirected to The method of corresponding page.
Background technique
The client of different screen size, which accesses identical server page resource, in current web construction can encounter webpage The problem of being not suitable with client device.Wherein solution first is that server end prepares different back pages, the visit of mobile terminal Ask return the mobile page, the access at the end PC returns to the PC page.When the access path of mobile terminal input PC, mobile terminal is received to be The PC page causes resource to mismatch;Similarly when the path of the end PC input mobile device access, the received end PC is that the mobile page is led It causes to mismatch.Therefore needing to solve the mobile terminal access end PC resource (or the end PC access mobile terminal resource) can not auto-returned The problem of mobile terminal (or the end PC) resource.
Summary of the invention
Present invention solves the technical problem that being to provide a kind of server end to being redirected to corresponding page after client identification The method in face;Client accesses identical server page resource and returns to the page for being adapted to corresponding client.
The technical solution that the present invention solves above-mentioned technical problem is:
The server end identifies the client device of request;It is returned and the matched page of client according to identification Face.
User-Agent parameter is included at least in the request of client.
The method the following steps are included:
Step 1: inquiry database converts data to the path URL of each equipment exclusive access resource when server starts Between corresponding key-value pair Map save;
Step 2: server receives the client device that request sends request according to request User-Agent parameter identification;
Step 3: judging whether the resource of client access matches;
Step 4: matched direct return resource, it is unmatched then use current URL as KEY key and obtained from Map it is correct Resource URL value and be redirected to the resource.
The request is http or https agreement, and client is mobile phone or PC.
The present invention identifies that client is mobile phone or PC by the User-Agent parameter in request;Further according to the client of identification End equipment orients the page;Solving the mobile terminal access end PC resource (or the end PC access mobile terminal resource) can not auto-returned The problem of mobile terminal (or the end PC) resource.
Detailed description of the invention
The following further describes the present invention with reference to the drawings:
Fig. 1 is flow chart of the method for the present invention.
Specific embodiment
As shown in Figure 1, the present invention uses following steps:
Step 1: inquiry database converts data to the path URL of each equipment exclusive access resource when server starts Between corresponding key-value pair Map save;
Step 2: server, which receives request, identifies the client device for sending request according to required parameter User-Agent;
Step 3: judging whether the resource of client access matches;
Step 4: matched direct return resource, it is unmatched then use current URL as KEY key and obtained from Map it is correct Resource URL value and be redirected to the resource.

Claims (5)

1. a kind of server end is redirected to corresponding page method after identifying to client, it is characterised in that: the service Device end identifies the client device of request;It is returned and the matched page of client according to identification.
2. according to the method described in claim 1, joining it is characterized by: including at least User-Agent in the request of client Number.
3. the method according to claim 1, wherein the method the following steps are included:
Step 1: when server starts inquiry database convert data to it is right between the path URL of each equipment exclusive access resource The key-value pair Map answered is saved;
Step 2: server receives the client device that request sends request according to request User-Agent parameter identification;
Step 3: judging whether the resource of client access matches;
It is unmatched then to use current URL as KEY key and obtain correctly money from Map Step 4: matched direct return resource Origin url value is simultaneously redirected to the resource.
4. according to the method described in claim 2, it is characterized in that, the method the following steps are included:
Step 1: when server starts inquiry database convert data to it is right between the path URL of each equipment exclusive access resource The key-value pair Map answered is saved;
Step 2: server receives the client device that request sends request according to request User-Agent parameter identification;
Step 3: judging whether the resource of client access matches;
It is unmatched then to use current URL as KEY key and obtain correctly money from Map Step 4: matched direct return resource Origin url value is simultaneously redirected to the resource.
5. according to the method described in claim 1, client is it is characterized by: the request is http or https agreement Mobile phone or PC.
CN201811417243.XA 2018-11-26 2018-11-26 A kind of server end is to the method for being redirected to corresponding page after client identification Withdrawn CN109726344A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811417243.XA CN109726344A (en) 2018-11-26 2018-11-26 A kind of server end is to the method for being redirected to corresponding page after client identification

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811417243.XA CN109726344A (en) 2018-11-26 2018-11-26 A kind of server end is to the method for being redirected to corresponding page after client identification

Publications (1)

Publication Number Publication Date
CN109726344A true CN109726344A (en) 2019-05-07

Family

ID=66295567

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811417243.XA Withdrawn CN109726344A (en) 2018-11-26 2018-11-26 A kind of server end is to the method for being redirected to corresponding page after client identification

Country Status (1)

Country Link
CN (1) CN109726344A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103237088A (en) * 2013-05-16 2013-08-07 百度在线网络技术(北京)有限公司 Corresponding relation library-based browsing method and system and cloud server
CN103714172A (en) * 2013-12-31 2014-04-09 华为技术有限公司 Page processing method, device and system
CN104854843A (en) * 2012-12-13 2015-08-19 高通股份有限公司 Loading a re-directed web page on a web browser of a client device in a communications system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104854843A (en) * 2012-12-13 2015-08-19 高通股份有限公司 Loading a re-directed web page on a web browser of a client device in a communications system
CN103237088A (en) * 2013-05-16 2013-08-07 百度在线网络技术(北京)有限公司 Corresponding relation library-based browsing method and system and cloud server
CN103714172A (en) * 2013-12-31 2014-04-09 华为技术有限公司 Page processing method, device and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CURIOUSZERO: "PC端、移动端的页面适配及兼容处理", 《HTTPS://WWW.CNBLOGS.COM/SHENXIAOLIN/P/5388464.HTML》 *
叶超LUKA: "【Javascript Demo】移动端访问PC端网页时跳转到对应的移动端网页", 《HTTPS://WWW.CNBLOGS.COM/YC-755909659/ARCHIVE/2015/06/06/4556066.HTML》 *

Similar Documents

Publication Publication Date Title
US8321502B2 (en) Method for optimizing a web content proxy server and devices thereof
CN101662464A (en) System for realizing HTTP request service and method thereof
CN102819451A (en) Method and system for calling browser plug-in
CN110798445B (en) Public gateway interface testing method and device, computer equipment and storage medium
US20180332115A1 (en) Management system
US20170142111A1 (en) Accessing local information based on a browser session
CN104836812A (en) Portal authentication method, device and system
CN111104675A (en) Method and device for detecting system security vulnerability
CN104123125A (en) Webpage resource acquisition method and device
US10798185B2 (en) Systems and methods for automated session identifier propagation
CN110808868A (en) Test data acquisition method and device, computer equipment and storage medium
CN103401933A (en) Method and system for batch uploading resource information and corresponding resource file
US9832322B1 (en) Techniques to transform network resource requests to zero rated network requests
US10594550B2 (en) Dynamic product installation based on user feedback
US11368297B2 (en) Method and apparatus for updating digital certificate
CN103399968A (en) Microblog information acquisition method and microblog information acquisition system
CN108664493B (en) Method and device for counting validity of URL (Uniform resource locator), electronic equipment and storage medium
CN109726344A (en) A kind of server end is to the method for being redirected to corresponding page after client identification
EP2309699A1 (en) Method and system for providing advertisement
CN111787041A (en) Method and apparatus for processing data
EP2809049B1 (en) An intelligent system of unified content posting
WO2011157183A2 (en) Investigation method and system for web application hosting
CN105915584A (en) Business request method based on proxy server and system
CN103944885A (en) Web data uploading control method and gateway device
US11032241B2 (en) Systems and methods for application level fault injection for parallel tests

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20190507

WW01 Invention patent application withdrawn after publication