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
Solved

Redirecting or Rewriting tidy URLs

Posted on 2011-03-22
3
579 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 500 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

840 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