Escape processing of symbols such as "&" "/" in the URL address

Source: Internet
Author: User

URLs appear with +, spaces,/,?,%,#,&,= and other special symbols, may not be able to get the correct parameter value on the server side, how is good?
Workaround: Convert these characters into characters that the server can recognize, corresponding to the following:

Special characters in the URL
Some symbols cannot be passed directly in the URL, and if you want to pass these special symbols in the URL, they will be encoded. The encoded format is: The ASCII code of the% plus character, which is a percent percent, followed by the ASCII (16-binary) code value of the corresponding character. For example, the encoded value of a space is "%20".

Some URL special symbols and codes are listed in the following table.

+ The + sign in the URL denotes a space %2b
Space Spaces in the URL can be used with a + or code %20
/ Separating directories and subdirectories %2f
? Separating the actual URLs and parameters %3f
% Specify special characters %25
# Represents a bookmark %23
& Delimiter between the parameters specified in the URL %26
= The value of the specified parameter in the URL %3d

Content from: http://xace.iteye.com/blog/481814/

Escape processing of symbols such as "&" "/" in the URL address

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.