Solved

Url Rewriting for dynamic urls

Posted on 2014-01-31
1
278 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

746 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

17 Experts available now in Live!

Get 1:1 Help Now