ISAPI_Rewrite中文變亂碼的解決方法
以前使用ISAPI_Rewrite 2.x中傳輸中文需要進行UrlEncode編碼即可。
現在換用了 ISAPI_Rewrite 3.x 發現編碼後的字元會變成亂碼,如果直接使用中文不編碼,則會被格式化為GBK字串。
翻了手冊,發現有一個配置引數可以解決該問題:
nounicode|NU
If NU flag is set, transformation from Unicode to UTF-8 will not take place and all Unicode characters remain encoded in %xx format.
在你的RewriteRule 規則後臺新增 NU 即可恢復正常。
關於ISAPI_Rewrite中文變亂碼解決方法,無論何種情況,統一解決思想:
1、在傳輸URL時,將中文進行urlencode,這樣是沒錯的。
2、如果是ISAPI_Rewrite 3.x 只需新增 NU 引數即可。
配置舉例:
傳遞的URL地址:
http://www.example.com/search-%e4%b9%b1%e7%a0%81.html
相應的RewriteRule:
RewriteRule ^/search-(.*)\.html$ /search\.do\?keyword=$1 [QSA,NU,PT,L]
相關文章
- CentOS中文亂碼問題的解決方法CentOS
- centos7 vim中文亂碼解決方法CentOS
- toad 中文顯示亂碼解決方法
- 讀mysql中文亂碼問題解決方法MySql
- Windows控制檯(cmd)中文亂碼解決方法Windows
- 解決MySQL中文亂碼和插入中文不顯示的方法MySql
- RHEL中文亂碼解決
- HttpClient 解決中文亂碼HTTPclient
- git操作時中文顯示亂碼的解決方法Git
- Mysql中文亂碼問題的最佳解決方法MySql
- Linux下解決matplotlib中文亂碼的方法Linux
- sqlldr 匯入中文出現亂碼解決方法SQL
- DEBIAN 5.02 SSH 中文亂碼解決方法
- request/response解決中文亂碼
- 解決中文亂碼問題
- eclipse中文亂碼解決Eclipse
- myeclipse解決中文亂碼Eclipse
- 解決Linux中文亂碼Linux
- ROS中解決中文亂碼ROS
- javaweb中中文亂碼解決方法總結之response和request解決方法JavaWeb
- 中文字元亂碼的解決字元
- IDEA控制檯輸出中文亂碼解決方法Idea
- Linux中文亂碼問題終極解決方法Linux
- Mac下navicat for mysql中文顯示亂碼解決方法MacMySql
- php函式substr_replace中文亂碼的替代解決方法PHP函式
- Tomcat5+Mysql中文亂碼問題的解決方法TomcatMySql
- MySql中文亂碼問題解決MySql
- Jmeter 解決中文亂碼問題JMeter
- 解決 SecureCRT 和 SecureFX 中文亂碼Securecrt
- Java 解決中文亂碼問題Java
- RDSSQLSERVER解決中文亂碼問題SQLServer
- Windows下Clion中文亂碼解決Windows
- 徹底解決Oracle中文亂碼Oracle
- 解決MySQL中文亂碼問題MySql
- Node.js 中文亂碼解決Node.js
- 解決SecureCRT中文顯示亂碼Securecrt
- QT中文顯示亂碼解決QT
- putty亂碼解決方法