How to hide url parameters in Php

Source: Internet
Author: User
How does Php hide the url of the get method following the url parameter? How does Php hide the first url without post? All
Http://test.com/test? Username = & pcname = & remoteIP = & dtime1 = & dtime2 = & result = & region = sh & ticket = 5219783F8B
To achieve this, you can:
Http://test.com/test /#
Thank you very much for providing detailed methods.


Reply to discussion (solution)

// Find an encryption algorithm on the Internet, suppose the method is a $ key = a ('username = & pcname = & remoteIP = & dtime1 = & dtime2 = & result = & region = sh & ticket = 5219783F8B '); http://test.com/test? Key = $ key

How to write this Rewrite rule
/Abc/dcb
Convert from rewrite? C = abc & B = dcb
/Abc/dcb? ** = Cgg .....
Convert from rewrite? C = abc & B = dcb & ** = cgg .....

echo 'http://test.com/test/'.base64_encode('username=xx&pcname=yy&remoteIP=zz&region=sh&ticket=5219783F8B');//http://test.com/test/dXNlcm5hbWU9eHgmcGNuYW1lPXl5JnJlbW90ZUlQPXp6JnJlZ2lvbj1zaCZ0aWNrZXQ9NTIxOTc4M0Y4Qg==parse_str(base64_decode('dXNlcm5hbWU9eHgmcGNuYW1lPXl5JnJlbW90ZUlQPXp6JnJlZ2lvbj1zaCZ0aWNrZXQ9NTIxOTc4M0Y4Qg=='),$arr);echo "
";print_r($arr);echo "
";/*Array( [username] => xx [pcname] => yy [remoteIP] => zz [region] => sh [ticket] => 5219783F8B)*/

1. encrypted url parameters
2. use POST

The first and third floors are supported!
The second floor has great limitations! Generally, url rewriting can be performed for static pages.

Base64_encode and base64_decode can be decrypted. Therefore, you must add a key to encrypt and decrypt the data.
For example:
Http://blog.csdn.net/fdipzone/article/details/8178982

Anti-gentleman or anti-villain? If it is an anti-bot, we recommend that you give up directly or use https + post instead. If you are an anti-DDoS professional, refer to the encryption algorithm upstairs for encryption. However, it is easy to decrypt the data.

What do I do if I have read the expected address of the landlord without parameters and do not need post?
The first few answers should contain at least one parameter.

I feel that it is of little practical use. Even if the URL is encrypted, you can decrypt it.

Ajax is not obvious.

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.