Redirect root domain with https to subfolder with wordpress





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I am trying to point the main domain from my host (https://website.com) which right now just goes to public_html to a subfolder in the public_html directory (new.website.com) with the user still seeing https://website.com without changing.



I tried doing what is found in here: https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory



And added this code to the .htaccess file:



<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?website.com$
RewriteCond %{REQUEST_URI} !^/new.website.com/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /new.website.com/$1
RewriteCond %{HTTP_HOST} ^(www.)?website.com$
RewriteRule ^(/)?$ new.website.com/index.php [L]




However 2 things happened incorrectly:




  1. The domain changed to https://new.website.com/404.html


  2. It is giving me a page to proceed with caution since new.website.com does not have a certificate.



(folder name and also a subdomain are both named: new.website.com)



How can i redirect so it still shows https://website.com and go to the wordpress folder?










share|improve this question





























    0















    I am trying to point the main domain from my host (https://website.com) which right now just goes to public_html to a subfolder in the public_html directory (new.website.com) with the user still seeing https://website.com without changing.



    I tried doing what is found in here: https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory



    And added this code to the .htaccess file:



    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^(www.)?website.com$
    RewriteCond %{REQUEST_URI} !^/new.website.com/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /new.website.com/$1
    RewriteCond %{HTTP_HOST} ^(www.)?website.com$
    RewriteRule ^(/)?$ new.website.com/index.php [L]




    However 2 things happened incorrectly:




    1. The domain changed to https://new.website.com/404.html


    2. It is giving me a page to proceed with caution since new.website.com does not have a certificate.



    (folder name and also a subdomain are both named: new.website.com)



    How can i redirect so it still shows https://website.com and go to the wordpress folder?










    share|improve this question

























      0












      0








      0








      I am trying to point the main domain from my host (https://website.com) which right now just goes to public_html to a subfolder in the public_html directory (new.website.com) with the user still seeing https://website.com without changing.



      I tried doing what is found in here: https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory



      And added this code to the .htaccess file:



      <IfModule mod_rewrite.c>
      RewriteEngine on
      RewriteCond %{HTTP_HOST} ^(www.)?website.com$
      RewriteCond %{REQUEST_URI} !^/new.website.com/
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ /new.website.com/$1
      RewriteCond %{HTTP_HOST} ^(www.)?website.com$
      RewriteRule ^(/)?$ new.website.com/index.php [L]




      However 2 things happened incorrectly:




      1. The domain changed to https://new.website.com/404.html


      2. It is giving me a page to proceed with caution since new.website.com does not have a certificate.



      (folder name and also a subdomain are both named: new.website.com)



      How can i redirect so it still shows https://website.com and go to the wordpress folder?










      share|improve this question














      I am trying to point the main domain from my host (https://website.com) which right now just goes to public_html to a subfolder in the public_html directory (new.website.com) with the user still seeing https://website.com without changing.



      I tried doing what is found in here: https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory



      And added this code to the .htaccess file:



      <IfModule mod_rewrite.c>
      RewriteEngine on
      RewriteCond %{HTTP_HOST} ^(www.)?website.com$
      RewriteCond %{REQUEST_URI} !^/new.website.com/
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ /new.website.com/$1
      RewriteCond %{HTTP_HOST} ^(www.)?website.com$
      RewriteRule ^(/)?$ new.website.com/index.php [L]




      However 2 things happened incorrectly:




      1. The domain changed to https://new.website.com/404.html


      2. It is giving me a page to proceed with caution since new.website.com does not have a certificate.



      (folder name and also a subdomain are both named: new.website.com)



      How can i redirect so it still shows https://website.com and go to the wordpress folder?







      php wordpress .htaccess ssl redirect






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 23 '18 at 17:09









      Marco MazaMarco Maza

      62




      62
























          1 Answer
          1






          active

          oldest

          votes


















          0














          If I understand your question right, you need to have website.com visible to the public but actually, WordPress is installed on new.website.com



          In this case, you need to do Wordpress multisite.



          Check: https://codex.wordpress.org/Create_A_Network






          share|improve this answer
























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            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%2fstackoverflow.com%2fquestions%2f53450646%2fredirect-root-domain-with-https-to-subfolder-with-wordpress%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














            If I understand your question right, you need to have website.com visible to the public but actually, WordPress is installed on new.website.com



            In this case, you need to do Wordpress multisite.



            Check: https://codex.wordpress.org/Create_A_Network






            share|improve this answer




























              0














              If I understand your question right, you need to have website.com visible to the public but actually, WordPress is installed on new.website.com



              In this case, you need to do Wordpress multisite.



              Check: https://codex.wordpress.org/Create_A_Network






              share|improve this answer


























                0












                0








                0







                If I understand your question right, you need to have website.com visible to the public but actually, WordPress is installed on new.website.com



                In this case, you need to do Wordpress multisite.



                Check: https://codex.wordpress.org/Create_A_Network






                share|improve this answer













                If I understand your question right, you need to have website.com visible to the public but actually, WordPress is installed on new.website.com



                In this case, you need to do Wordpress multisite.



                Check: https://codex.wordpress.org/Create_A_Network







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 23 '18 at 17:37









                Wasim SayyedWasim Sayyed

                434619




                434619
































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • 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%2fstackoverflow.com%2fquestions%2f53450646%2fredirect-root-domain-with-https-to-subfolder-with-wordpress%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

                    "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                    Alcedinidae

                    Origin of the phrase “under your belt”?