如何在ASP.NET中重写URL [英] How to rewrites URLs in ASP.NET
问题描述
我一直在使用Helicon重写我的URL,它们位于文件htaccess(无点)中.重写过程类似于:
RewriteRule /e-commerce /e-commerce.asp [I,U]
我已经阅读了一些答案,从在C#中重命名文件
我看过几个文件名,但我不知道使用哪个文件名.我确定那里有一个与我相匹配的问题,但是经过几个小时的考察,我希望一些专家能够为我提供帮助.
谢谢!
您应该尝试URLRewriter.Net.集成到asp.net项目中非常容易.代替IIS级别,它在asp.net级别实现URL重写.
I have been using Helicon to rewrite my URLs and they are in a file htaccess (no dot). The rewrite goes something like:
RewriteRule /e-commerce /e-commerce.asp [I,U]
I have read a few answers, starting with How to Determine the Installed ASP.NET Version of Host from a Web Page. I ran the page, and it displayed 2.0.50727.3643
A little history so maybe one can be gentle. I was a Microsoft Frontpage MVP, but disliked their Frontpage Server Extensions (FPSE). Some hosting companies are still using them, but the last ones were back in 2002.
I was a Microsoft guy. So I went with Microsoft servers and started using ASP includes. Then I came across Helicon - and used it for 4-5 yrs. Some of my sites are having no issues, but some of them are. And my new prices along with new hardware for credit card processing is out and I really need help (BTW, I looked for an e-commerce section but found nothing if y'all have one, I'll be more than happy to help).
I do not even know what is the file name I should be using and the information that goes in there.
Custom Url Rewriting in asp.net
I have seen several file names but I do not know which one to use. I am sure there is a question out there that matches mine, but after looking for several hours, I am hoping some of the experts will be able to help me out.
Thank you!
You should give a try to URLRewriter.Net. It's very easy to integrate into asp.net project. Instead of IIS level it implements url rewriting at asp.net level.
这篇关于如何在ASP.NET中重写URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!