需要帮助重写URL问题! [英] Need help Rewrite URL problem !

查看:84
本文介绍了需要帮助重写URL问题!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我是asp.net的新手,我尝试自己创建一个网站,我使用Rewrite Url作为我的网站。我使用Intelligencia.UrlRewriter.dll。



这是我的问题。我几乎可以回复链接。当我去我的网站的产品详细信息页面。它重写如下:

Hello everybody ,

I'm a newbie in asp.net and I try to make a website by myself and I use Rewrite Url for my website.I used Intelligencia.UrlRewriter.dll.

Here is my problem. I can rewirte almost link . When I go to product details page of my website. It have rewrite like this :

http://www.ngocclio.com/Bo-Short-Cho-Trang-Den-p99/





其中:99是ProductID,一切正常单位我单击添加到购物车按钮,页面将重新加载,但这次url自动添加



In it : 99 is ProductID and everything is OK unitl I click Add to Cart button and the page will reload but this time url auto add

http://www.ngocclio.com/Bo-Short-Cho-Trang-Den-p99/?ProductId=99





并发生404错误。我不知道为什么!我检查了我网站上的每个链接,但没有发现问题所以任何人都可以解释我为什么会这样做,如何从我的网址中删除?ProductId = 99 br $> b $ b

对不起我的英文。谢谢!



and make 404 error occurs . I dont know why ! I check every link in my website and dont find out the problem so can anyone explain me why did it happen and How can I remove "?ProductId=99" from my url

Sorry for my english.Thank you !

推荐答案

要删除它,你需要先找出来究竟是将它添加到 QueryString



正如您所说,当您单击按钮时会发生这种情况添加到购物车,请查看按钮单击事件以及事件中调用的所有方法。



检查是否使用 ProductId QueryString 将页面重定向到另一个页面。



类似......

To remove this, you need to first find out where exactly it is adding this to the QueryString.

As you mentioned that this happens when you click the Button "Add to Cart", so review the Button Click event and all the methods called inside the Event.

Check whether it redirects the Page to another Page with a ProductId QueryString.

Something like...
Response.Redirect("SomePage.aspx?ProductId" + productIdVariable);


这篇关于需要帮助重写URL问题!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆