Solved

Url Rewriting for dynamic urls

Posted on 2014-01-31
1
286 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

705 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