The plus sign in the URL cannot be resolved after Apache uses the Rewriterule redirect in the. htaccess file

Source: Internet
Author: User
Tags urlencode

Today in the use of. htaccess do pseudo-static time, there is a strange thing, there will be a problem with C + + in the URL, in the processing of C + + when the word, in any case, $_get will not get + +, can only get C space.


At first I thought it was useless urlencode processing, and then found that the actual processing, backstage after the investigation, to determine the problem is rewrite, because in a single file environment can get C + + the word, of course, is through the urlencode.

Reason: Rewrite cannot get the word C + +, because Apache does urldecode processing after getting parameters, resulting in the addition of the plus part in C + +

Solution currently only see one, in the PHP official network also has records, in the processing of C + +, two times UrlEncode processing, that is, UrlEncode ("C + +"), so rewrite, you can get the word C + +.

Attach the specific address on the Php.net Http://www.php.net/urlencode

The plus sign in the URL cannot be resolved after Apache uses the Rewriterule redirect in the. htaccess file

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.