Solved

Url Rewriting for dynamic urls

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Server Error 11 58
Turn on intranet settings 1 56
C# MVC and a global static factory that never dies 4 58
ASP.net VB.net Highlight html text in yellow in body of email 5 22
Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 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