Iis rewrite false static Chinese invalid Problem Solution

Source: Internet
Author: User

Iis rewrite pseudo-static invalid Chinese characters I have summarized two solutions. One is to solve the problem by using the [NU] parameter in rewrite pseudo-static tasks, the other is the conversion of Chinese characters into urlencode, which I have mentioned before. The conversion does not contain Chinese characters, but the browser will automatically recognize Chinese characters and access them normally.

When processing a tag page today, the pseudo-static function is required. During rewrite

The reason is that the Chinese Unicode information will be ISAPI_Rewrite into the uft-8 format encoding, we only need to add the [NU] parameter after the corresponding pseudo static rules to prohibit the encoding conversion,

For example

The Code is as follows: Copy code
RewriteRule ^/shop-(. * example .html $/shop. php? Nick = $1 [NU]

In this way, Chinese characters are supported.

Note: The above method is useful in IIS and can be ignored in apache.

Method 2,This method can be used for iis pseudo-static and apache pseudo-static. This method is compatible with all server environments, as shown in figure

A. php? A = yijucheng

This may cause problems sometimes, but we can use the php urlencode () function for conversion.

A. php? A = urlenocde ('one-click tutorial net ');

Then on the acceptance page, you can directly $ _ GET ['a'] to solve the problem.

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.