Solved

Web.config whole domain redirect

Posted on 2012-12-20
8
313 Views
Last Modified: 2013-02-18
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.
0
Comment
Question by:garyilm
  • 4
8 Comments
 
LVL 33

Accepted Solution

by:
Big Monty earned 500 total points
ID: 38713038
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
 
LVL 26

Expert Comment

by:Shaun Kline
ID: 38713779
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
 

Author Comment

by:garyilm
ID: 38889693
I've requested that this question be deleted for the following reason:

nobody answred with the details i provided.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 33

Expert Comment

by:Big Monty
ID: 38889692
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
 
LVL 33

Expert Comment

by:Big Monty
ID: 38889694
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
 
LVL 33

Expert Comment

by:Big Monty
ID: 38894850
I recommend accepting my first answer, it covers everything s/he is looking to do
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

810 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