Redirect from Old Site to New Site on different folderApache SSL New Domain RedirectIIS Redirect Old Site to...

India just shot down a satellite from the ground. At what altitude range is the resulting debris field?

How easy is it to start Magic from scratch?

Why Were Madagascar and New Zealand Discovered So Late?

Sort a list by elements of another list

How long to clear the 'suck zone' of a turbofan after start is initiated?

What happens if you roll doubles 3 times then land on "Go to jail?"

What is the opposite of 'gravitas'?

Why, precisely, is argon used in neutrino experiments?

Flow chart document symbol

How do we know the LHC results are robust?

Failed to fetch jessie backports repository

Applicability of Single Responsibility Principle

Increase performance creating Mandelbrot set in python

System.debug(JSON.Serialize(o)) Not longer shows full string

How did Arya survive the stabbing?

Would a high gravity rocky planet be guaranteed to have an atmosphere?

What is paid subscription needed for in Mortal Kombat 11?

How do I rename a Linux host without needing to reboot for the rename to take effect?

How do I go from 300 unfinished/half written blog posts, to published posts?

How does Loki do this?

Roman Numeral Treatment of Suspensions

Lay out the Carpet

Can the discrete variable be a negative number?

when is out of tune ok?



Redirect from Old Site to New Site on different folder


Apache SSL New Domain RedirectIIS Redirect Old Site to new siteRedirect a url to a new hostTrying to Redirect from site1.com to site2.com using htaccess without changing url in the addressbarIIS - most efficient way to redirect many host namesIIS 8 URL Redirect on site levelIIS redirect into subdirectoryARR Load Balance with two Machines - Always redirect to same SiteHSTS & redirects on IIS 8.5HTTP Redirect versus URL Rewrite (IIS)













1















I want to redirect all request from a url host www.hostname1.com (including all subdirectores-www.hostname1.com/....) to a different url with a different host, www.newHost.com. I have already made the change in the DNS but am wondering what changes I should make on the server on which www.newHost.com is hosted so that the redirect takes place with the new url displayed on the browser.



I have look at the IIS. Under the configurations for www.newHost.com, I can bind www.hostname1.com to the same IP as www.newHost.com but this works only for the home page for www.hostname1.com and does not rewrite the url address in the browser window.



Please advise on how to make this change.










share|improve this question














bumped to the homepage by Community 3 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    1















    I want to redirect all request from a url host www.hostname1.com (including all subdirectores-www.hostname1.com/....) to a different url with a different host, www.newHost.com. I have already made the change in the DNS but am wondering what changes I should make on the server on which www.newHost.com is hosted so that the redirect takes place with the new url displayed on the browser.



    I have look at the IIS. Under the configurations for www.newHost.com, I can bind www.hostname1.com to the same IP as www.newHost.com but this works only for the home page for www.hostname1.com and does not rewrite the url address in the browser window.



    Please advise on how to make this change.










    share|improve this question














    bumped to the homepage by Community 3 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      1












      1








      1








      I want to redirect all request from a url host www.hostname1.com (including all subdirectores-www.hostname1.com/....) to a different url with a different host, www.newHost.com. I have already made the change in the DNS but am wondering what changes I should make on the server on which www.newHost.com is hosted so that the redirect takes place with the new url displayed on the browser.



      I have look at the IIS. Under the configurations for www.newHost.com, I can bind www.hostname1.com to the same IP as www.newHost.com but this works only for the home page for www.hostname1.com and does not rewrite the url address in the browser window.



      Please advise on how to make this change.










      share|improve this question














      I want to redirect all request from a url host www.hostname1.com (including all subdirectores-www.hostname1.com/....) to a different url with a different host, www.newHost.com. I have already made the change in the DNS but am wondering what changes I should make on the server on which www.newHost.com is hosted so that the redirect takes place with the new url displayed on the browser.



      I have look at the IIS. Under the configurations for www.newHost.com, I can bind www.hostname1.com to the same IP as www.newHost.com but this works only for the home page for www.hostname1.com and does not rewrite the url address in the browser window.



      Please advise on how to make this change.







      iis web-server ip redirect url






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 29 '14 at 4:26









      user207265user207265

      61




      61





      bumped to the homepage by Community 3 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 3 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          On the new server, under the www.hostname1.com site (the one you created on the new server to catch traffic to the old site after the DNS change), use this as your entire web.config file.



          <?xml version="1.0" encoding="UTF-8"?>
          <configuration>
          <system.webServer>
          <rewrite>
          <rules>
          <rule name="301 redirect entire site" stopProcessing="true">
          <match url="^(.*)$" />
          <action type="Redirect" redirectType="Permanent" url="http://www.newhost.com/{R:1}" appendQueryString="true" />
          </rule>
          </rules>
          </rewrite>
          </system.webServer>
          </configuration>


          That will create a rewrite rule that grabs the entire content of the URL (after the http://www.hostname1.com/), puts "http://www.newhost.com/" in front of it and any query string on the end, and redirects the browser to that URL. This is a 301 redirect (permanent), so it should be SEO safe so Google doesn't punish your ranking. I haven't tested this, but I think it should work for you.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "2"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f570610%2fredirect-from-old-site-to-new-site-on-different-folder%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            On the new server, under the www.hostname1.com site (the one you created on the new server to catch traffic to the old site after the DNS change), use this as your entire web.config file.



            <?xml version="1.0" encoding="UTF-8"?>
            <configuration>
            <system.webServer>
            <rewrite>
            <rules>
            <rule name="301 redirect entire site" stopProcessing="true">
            <match url="^(.*)$" />
            <action type="Redirect" redirectType="Permanent" url="http://www.newhost.com/{R:1}" appendQueryString="true" />
            </rule>
            </rules>
            </rewrite>
            </system.webServer>
            </configuration>


            That will create a rewrite rule that grabs the entire content of the URL (after the http://www.hostname1.com/), puts "http://www.newhost.com/" in front of it and any query string on the end, and redirects the browser to that URL. This is a 301 redirect (permanent), so it should be SEO safe so Google doesn't punish your ranking. I haven't tested this, but I think it should work for you.






            share|improve this answer




























              0














              On the new server, under the www.hostname1.com site (the one you created on the new server to catch traffic to the old site after the DNS change), use this as your entire web.config file.



              <?xml version="1.0" encoding="UTF-8"?>
              <configuration>
              <system.webServer>
              <rewrite>
              <rules>
              <rule name="301 redirect entire site" stopProcessing="true">
              <match url="^(.*)$" />
              <action type="Redirect" redirectType="Permanent" url="http://www.newhost.com/{R:1}" appendQueryString="true" />
              </rule>
              </rules>
              </rewrite>
              </system.webServer>
              </configuration>


              That will create a rewrite rule that grabs the entire content of the URL (after the http://www.hostname1.com/), puts "http://www.newhost.com/" in front of it and any query string on the end, and redirects the browser to that URL. This is a 301 redirect (permanent), so it should be SEO safe so Google doesn't punish your ranking. I haven't tested this, but I think it should work for you.






              share|improve this answer


























                0












                0








                0







                On the new server, under the www.hostname1.com site (the one you created on the new server to catch traffic to the old site after the DNS change), use this as your entire web.config file.



                <?xml version="1.0" encoding="UTF-8"?>
                <configuration>
                <system.webServer>
                <rewrite>
                <rules>
                <rule name="301 redirect entire site" stopProcessing="true">
                <match url="^(.*)$" />
                <action type="Redirect" redirectType="Permanent" url="http://www.newhost.com/{R:1}" appendQueryString="true" />
                </rule>
                </rules>
                </rewrite>
                </system.webServer>
                </configuration>


                That will create a rewrite rule that grabs the entire content of the URL (after the http://www.hostname1.com/), puts "http://www.newhost.com/" in front of it and any query string on the end, and redirects the browser to that URL. This is a 301 redirect (permanent), so it should be SEO safe so Google doesn't punish your ranking. I haven't tested this, but I think it should work for you.






                share|improve this answer













                On the new server, under the www.hostname1.com site (the one you created on the new server to catch traffic to the old site after the DNS change), use this as your entire web.config file.



                <?xml version="1.0" encoding="UTF-8"?>
                <configuration>
                <system.webServer>
                <rewrite>
                <rules>
                <rule name="301 redirect entire site" stopProcessing="true">
                <match url="^(.*)$" />
                <action type="Redirect" redirectType="Permanent" url="http://www.newhost.com/{R:1}" appendQueryString="true" />
                </rule>
                </rules>
                </rewrite>
                </system.webServer>
                </configuration>


                That will create a rewrite rule that grabs the entire content of the URL (after the http://www.hostname1.com/), puts "http://www.newhost.com/" in front of it and any query string on the end, and redirects the browser to that URL. This is a 301 redirect (permanent), so it should be SEO safe so Google doesn't punish your ranking. I haven't tested this, but I think it should work for you.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Feb 6 '14 at 18:42









                kevinmickekevinmicke

                3261315




                3261315






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Server Fault!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f570610%2fredirect-from-old-site-to-new-site-on-different-folder%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

                    Список ссавців Італії Природоохоронні статуси | Список |...

                    Українські прізвища Зміст Історичні відомості |...