Javascript-js code How to implement access a page Jump B page normal display, and direct access to the B page will jump to a page

Source: Internet
Author: User
JS code How to achieve access a page jump B normal display, and direct access to the B page will jump to a page, that is, b page can not directly access, must go through a page to jump over, to normal to the B page.

Reply content:

JS code How to achieve access a page jump B normal display, and direct access to the B page will jump to a page, that is, b page can not directly access, must go through a page to jump over, to normal to the B page.

Is it possible to do this?
A page jumps to page B at the time of the URL with parameters such as:
b.html?param=0
If the parameter exists, do not jump, direct access to a page without parameters

From A to B, and the difference between the direct access B is the HTTP header referer different, referer content is a address, direct access is empty.
So you just have to judge Referer on the B page.
PHP is used $_SERVER['HTTP_REFERER'] to judge the words.

by checkingdocument.referrer

By the way to you Baidu a little information to see!

  • 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.