. htaccess how to jump

Source: Internet
Author: User
. htaccess how to jump.
Determine if there are keywords such as Google in the routing URL, and then jump to the new URL.
If the keyword does not appear, open normally?
Can this be achieved?
Completely small white ah, to help everyone. . htaccess

Share to:


------Solution--------------------
Your purpose can be achieved through the anti-theft chain of the HTTP protocol.


if (Isset ($_server[' http_referer ')) {

Judging $_server[' http_referer ' isn't there Google
If yes, the description is this website, if not, then the description is not this site,
if (Stristr ($_server[' http_referer '), "Google") ===false) {
Header (' Location: Correct url.php ');

}else{
Jump to Warning page
Header (' Location:warning.php ');
}

}else{
Jump to Warning page
Header (' Location:warning.php ');
}
If you have to make it through. Htacess, you can see the PHP video tutorial of the Preach Wisdom podcast PHP Large portal Core technology-static 8 (using the Apache rewrite mechanism to achieve page pseudo-static 1), which is also mentioned in this knowledge point.
------Solution--------------------
Apache Anti-theft chain

  • Related Article

    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.