I have 2 pages: page1.aspx and page2.aspx
I want to rewrite like this:
page1.aspx?x=nnn => /nnn
page2.aspx?y=mmm => /mmm
Is it possible to know which long url is started from when a short url is entered?
Please give us feedback no matter whether you get your answer.
Please "mark as answer" if it's useful for you
You need to be able to distinguish between the pages with a regular expression. That means you need a common pattern that will be reconized and will be used to redirect to the real page. You patterns could be like this:
/year/month/day/permanent-link => page.aspx?y=year&m=month&d=day&permalink=permanent-link
/category/category-name => categories.aspx?category=category-name
/tag/tag-name => tags.aspx?tag=tag-name
Having said that, url rewriting is kind of a pain since you have different ways of doing it in IIS 6 or II 7.
I have writen a post on my blog about my experiences on rewriting: http://www.gbogea.com/2009/05/01/lessons-learned-in-url-rewriting
Maybe this is useful to you.
Gabriel Bogéa (http://www.gbogea.com)
Please 'Mark as Answer' the post(s) that helped you
You can get an complete idea from here:
for more info:
Please "Mark as Answered" if helpful for you.