Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Redirecting or Rewriting tidy URLs

Posted on 2011-03-22
3
Medium Priority
?
593 Views
Last Modified: 2012-05-11
Hi All,

Lets say I have the following URL..

www.mysite.com/helloworld

What I need to do is to rewrite or redirect this URL to

www.mysite.com/site/default.aspx?site=helloworld

helloworld could potentially be any alias that has been added to a my database so it needs to cater for handling any alias dynamically.

for example...

www.mysite.com/helloworld

to...

www.mysite.com/site/default.aspx?site=helloworld

Can anyone suggest how I can achieve this?

Thanks,

Rit
0
Comment
Question by:rito1
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
Imran Javed Zia earned 2000 total points
ID: 35194608
Hi,

there are many ways to do this,
you can use your own code to do that
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
http://weblogs.asp.net/owscott/archive/2010/01/26/iis-url-rewrite-hosting-multiple-domains-under-one-site.aspx
and if you are using iis 7 or later then you can use its builtin features too for url rewriting
http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/
http://blogs.iis.net/bills/archive/2008/05/31/urlrewrite-module-for-iis7.aspx

and using iis features is more recommended way
Thanks

Thanks
0
 
LVL 1

Author Comment

by:rito1
ID: 35199686
Thanks IJZ, I am just looking at these now.

Rit
0
 
LVL 16

Expert Comment

by:Imran Javed Zia
ID: 35199714
You are most Welcome.
If it was helpful then kindly mark it as answered
Thanks
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

886 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