Solved

Url Rewriting for dynamic urls

Posted on 2014-01-31
1
279 Views
Last Modified: 2014-02-03
In my application, I want to rewrite Urls. Few of them are static and few of them are dynamic.The application is in asp.net 2.0. I have gone through few examples which are helped me to rewrite the static URL. but we are unable to rewrite urls which we populating through database. Below is the scenario.
Lets say, on main product page, I want to show list of sub products.This list we are binding through database with where it should redirect to. Now this suproduct is redirecting to its details page. http://www.something.com/subproductdetails.aspx?subproductid=1
I want to rewrite this URl with http://www.something.com/subproductName.
Is there any solution for the same, because without changing database value.
Thank You!
0
Comment
Question by:vikasbapat
1 Comment
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 500 total points
ID: 39825971
You have to write custom method in the  Application_BeginRequest event of global.ascx or you have to write custom module for it and provide  in the web.config file appropriately.


For more reference please do refer:

http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

There is one more option.. save the original url and respective rewrite url in the DB or Dictionary and read and show accordingly. If you use DB in the sense have in Cache object for performance gain.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now