Click here to Skip to main content
12,942,930 members (60,338 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi there

I am working on a web project in C# .

I want to display a user-friendly url in the web browser but would like to redirect it
according to my search id.

For example lets say a user writes a url
but this should be redirected to
and even after redirecting the url should be displayed as

Please help me out with this issue.

Thanks in advance.
Posted 5-Jan-13 19:01pm
If this is ASP.NET, add the tag "ASP.NET".
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There are two similar or related by different approaches. One is URL routing, another is URL rewriting:[^],[^].

The manual on routing:[^].

On rewriting:[^].

You will find all you need. Good luck,
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

eku123 7-Jan-13 10:50am
thanks to both of u ...but this is not solving my problem.

Let me reframe another question to solve my problem.

Consider that whenever a user writes a url in his browser after my domain i.e
I want that all this url should be automativally redirected in my Default.aspx(i.e my initial page ) so that i can later on use in to create my own search in C# in Default.aspx.cs -->pageload()event.
Please note: I should be able to read the url given by user and not the

Plz guide me with the same.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 4,633
CHill60 2,880
Maciej Los 2,268
Jochen Arndt 1,900
ppolymorphe 1,755

Advertise | Privacy | Mobile
Web02 | 2.8.170518.1 | Last Updated 6 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100