web.config 伪静态规则
<add virtualUrl="~/(.*)/tags/(.*)" destinationUrl="~/user/?username=$1&gjc=$2"/>
关键词:搜索引擎打开伪静态页面
http://www.xxx.com/admin/tags/%e6%90%9c%e7%b4%a2%e5%bc%95%e6%93%8e
打印出SQL语句是:
RsExec 'select count (*) as Num from xxx where ID=1 and guanjianzi like ''%��������%'''
如果用原始的URL访问,就没有乱码
http://www.xxx.com/user/?username=admin&gjc=%e6%90%9c%e7%b4%a2%e5%bc%95%e6%93%8e
打印出SQL语句是:
RsExec 'select count (*) as Num from xxx where ID=1 and guanjianzi like ''%搜索引擎%'''整个网站编码是utf-8的。。web.config顶部也设置了 <?xml version="1.0" encoding="utf-8"?>求解~~伪静态中文乱码
<add virtualUrl="~/(.*)/tags/(.*)" destinationUrl="~/user/?username=$1&gjc=$2"/>
关键词:搜索引擎打开伪静态页面
http://www.xxx.com/admin/tags/%e6%90%9c%e7%b4%a2%e5%bc%95%e6%93%8e
打印出SQL语句是:
RsExec 'select count (*) as Num from xxx where ID=1 and guanjianzi like ''%��������%'''
如果用原始的URL访问,就没有乱码
http://www.xxx.com/user/?username=admin&gjc=%e6%90%9c%e7%b4%a2%e5%bc%95%e6%93%8e
打印出SQL语句是:
RsExec 'select count (*) as Num from xxx where ID=1 and guanjianzi like ''%搜索引擎%'''整个网站编码是utf-8的。。web.config顶部也设置了 <?xml version="1.0" encoding="utf-8"?>求解~~伪静态中文乱码
ASP中的用法:Server.URLEncode(“内容”) 例如:
<% response.write Server.UrlEncode("工具网") %>ASP中的用法:Server.UrlDecode(“内容”) 例如:
<% response.write Server.UrlDecode("%E5%B7%A5%E5%85%B7%E7%BD%91") %>
http://blog.csdn.net/jason_dct/article/details/8505193
<system.web>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8"></globalization>
</system.web>
编码统一,检查一下。
然后再处理这样的URL字符进行编码解码。
HttpUtility.UrlEncode
HttpUtility.UrlDecode