Web.config whole domain redirect

I need to change domain names and want to do a whole name redirect with a web.config file. How do I do that.

I need http://www.olddomain.com/products.asp?id=1 to redirect to http://www.newdomain.com/products.asp?id-1

So I need to rewrite the complete url incliding parameters.
garyilmAsked:
Who is Participating?
 
Big MontyConnect With a Mentor Senior Web Developer / CEO of ExchangeTree.org Commented:
in IIS7+, it's better to do it in the rewrite module:

http://www.iis.net/learn/extensions/url-rewrite-module/using-the-url-rewrite-module

for iis6 and below, a third party (free) tool will work best:

http://www.isapirewrite.com
0
 
Shaun KlineLead Software EngineerCommented:
Web.config files do not exist in the classic ASP language. They are part of ASP.net. As Big Daddy stated above, this is better done from the server side. If your site is on IIS 6 or less, you can do it from the site properties.
0
 
garyilmAuthor Commented:
I've requested that this question be deleted for the following reason:

nobody answred with the details i provided.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
I offered viable solutions to your question, not sure what else you're looking for, but since there was no feedback, I assumed it had answered your question.
0
 
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
I offered viable solutions to your question, not sure what else you're looking for, but since there was no feedback, I assumed it had answered your question.
0
 
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
I recommend accepting my first answer, it covers everything s/he is looking to do
0
All Courses

From novice to tech pro — start learning today.