URL伪静态地址后,微信里转发在原URL原始链接拼接报错!

lilo202 2014-09-05 10:16:42
URL伪静态地址后,微信里转发在原URL原始链接拼接报错!


正常地址:http://www.xxxxx.cn/wap/piccontentNews-113955.html




从微信里转发,他会默认加上
http://www.xxxxx.cn/wap/piccontentNews-113955.html?from=singlemessage&isappinstalled=0




微信会为原始链接拼接如下参数:
朋友圈 from=timeline&isappinstalled=0
微信群 from=groupmessage&isappinstalled=0
好友分享 from=singlemessage&isappinstalled=0



我想问下,现在我的URL伪静地址应该如何写呢?
导致我网站访问不到
从微信里转发,他会默认加上
http://www.xxxxx.cn/wap/piccontentNews-113955.html?from=singlemessage&isappinstalled=0



URL伪静态规则
<rewrite url="~/wap/piccontentNews-([0-9]*).html$" to="~/wap/piccontentNews.aspx?UGId=$1" processing="stop"/>
我的规则应该怎么样写呢?
我试过这样

<rewrite url="~/wap/piccontentNews-([0-9]*).html$" to="~/wap/piccontentNews.aspx?UGId=$1" processing="stop"/>
<rewrite url="~/wap/piccontentNews-([0-9]*).html&from=singlemessage&isappinstalled=0$" to="~/wap/piccontentNews.aspx?UGId=$1?from=singlemessage&isappinstalled=0" processing="stop"/>
<rewrite url="~/wap/piccontentNews-([0-9]*).html&from=groupmessage&isappinstalled=0$" to="~/wap/piccontentNews.aspx?UGId=$1?from=groupmessage&isappinstalled=0" processing="stop"/>


也不行
...全文
4155 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
蓝染惣翔 2016-01-12
  • 打赏
  • 举报
回复
引用 8 楼 lilo202 的回复:
已解决,自己解决了
怎么解决的??
lilo202 2016-01-08
  • 打赏
  • 举报
回复
已解决,自己解决了
fy243 2015-12-02
  • 打赏
  • 举报
回复
修改伪静态规则,在伪静态规则里面加上 (.*) 就可以了,也就是 在静态网址结束后 html 后面加上(.*) 即可。 如: RewriteRule ^article/(.+).html(.*)$ article.php?name=$1 [L] RewriteRule ^product/(.+).html(.*)$ product.php?name=$1 [L] RewriteRule /user/news_show_(\d+)\.html(.*) /user/news_show\.asp\?id=$1 [N,I]
kerry0124 2015-03-21
  • 打赏
  • 举报
回复
<rewrite url="~/wap/piccontentNews-([0-9]*).html(.*)" to="~/wap/piccontentNews.aspx?UGId=$1" processing="stop"/>
SUYA012 2015-01-20
  • 打赏
  • 举报
回复
我的解决方案: Step1. 设置跳转网页:把所有带有?from= 的链接 跳转至一个独立页面 (参考代码 <from>^/(.*?)?from=([a-z]+)(.*?)</from> <to>/weixin_redirt.jsp</to>)。 Step2. 在跳转页面获取当前url ,对url 进行去除 ?from= 处理后跳转。
dfzx 2015-01-16
  • 打赏
  • 举报
回复
.Net4.0支持动态路由了,配置自己的路由表,试试动态路由吧
baidu_25294175 2015-01-13
  • 打赏
  • 举报
回复
怎么没回帖了? 楼主解决了吗
vibmro 2014-10-24
  • 打赏
  • 举报
回复
兄弟解决了吗?
t3021 2014-10-19
  • 打赏
  • 举报
回复
这是比较麻烦的问题,微信对于伪静态就是不支持!

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧