How to rewrites URLs in ASP.NET

2019-09-11 01:08发布

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.

Rename a file in C#

How to rename a file in .NET?

Rewriting URLs in ASP.NET/C#

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!

1条回答
贪生不怕死
2楼-- · 2019-09-11 01:38

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.

查看更多
登录 后发表回答