|
#1
|
|||
|
|||
|
How to achieve 301 redirect with IIS? thanks |
|
#2
|
|||
|
|||
|
Yes, 301 redirect is interesting for me too...and what is the difference between 302 and 301 redirect?
Chris |
|
#3
|
|||
|
|||
|
Hello,
301 Redirect means permanent redirect and 302 Redirect means temporary redirect. Login in your windows server and start IIS console. Now choose the server running the site you want to forward. Remember that you need 2 sites - one to forward from and one to forward to. These can be on the same or separate servers. Right click on the site you want to redirect from and choose Properties - Home Directory. The default is the first choice, "A directory located on this computer". Change it to "A redirection to a URL" and type in the new URL. If you want it to be a 301, then be sure to check ON the choice for “A permanent redirection for this resource”. If you want it to be a 302, leave the choice checked OFF. If you want to pass on some variables, for example, you wanted to redirect an ASP.NET site that accepted arguments for some pages and pass those same arguments on to the same pages at the new site. In this case, in the "Redirect to:" box, enter the domain you wish to move to (no trailing slash), plus $S$Q. By example: http://www.seconddomain.com$S$Q Next, check the options that state the client will be sent to "The exact URL entered above", as well as "A permanent redirection for this resource" (if you want it to be a 301). $S$Q are tags that IIS will automatically replace - $S will be replaced with the subdirectory location (such as “/modules/store.aspx”) and $Q will be replaced with the query string (such as “?id=1”). Regards Last edited by HostingASPNet; 03-04-2008 at 11:43 AM. |
|
#4
|
|||
|
|||
|
Very useful!
|
|
#5
|
|||
|
|||
|
Thanks ! This is very useful.
But how about Https redirection. If your site has to be redirected; how to handle the Https redirect part ? The http can be handled as you mentioned. |
|
#6
|
|||
|
|||
|
I have used https://www.seconddomain.com$S$Q and it works for me.
|
|
#7
|
|||
|
|||
|
Very helpful.Thanks
__________________
JCB |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Technology to make you Google - MyADSL | WindowsHostingNews | Windows Hosting News | 0 | 02-09-2009 01:03 PM |
| I want to make an IT career and to learn ASP.NET | Facts | Looking for a Job | 1 | 09-27-2008 11:04 AM |
| How to make page redirection in ASP.NET? | June | ASP.NET Programming | 1 | 08-21-2008 04:46 PM |
| make a profit after investing in a hosting company | OneWay | Running an ASP.NET Hosting Business | 1 | 08-10-2008 11:09 AM |
| How to redirect a user to a certain web page? | Peer | ASP.NET Programming | 1 | 04-15-2008 03:33 PM |