Redirect subdomain to https site

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















I'm trying to redirect bot.domain.tld to https://domain.tld:8087, but it only redirect the domain to http://domain.tld:8087.
The port is only reachable with https so it doesn't work if it doesn't redirect correctly.



Entry in the apache config:



<VirtualHost *:80>
ServerName bot.domain.tld
RedirectPermanent / https://domain.tld:8087/
</VirtualHost>


Edit: It seems to work on some web browsers, but firefox (on mac) still redirect me to the http site, while firefox on windows & safari redirect me to https ._.










share|improve this question
























  • If it works on some browsers but not others, there might be an old version of the page stored in the browser's cache, or in a caching proxy that's used by the non-redirecting browser. That problem should be fixable by flushing the cache.

    – telcoM
    Feb 7 at 9:12











  • what happens if you use firefox on mac and type in the wanted https: url directly ?

    – X Tian
    Feb 7 at 9:31















1















I'm trying to redirect bot.domain.tld to https://domain.tld:8087, but it only redirect the domain to http://domain.tld:8087.
The port is only reachable with https so it doesn't work if it doesn't redirect correctly.



Entry in the apache config:



<VirtualHost *:80>
ServerName bot.domain.tld
RedirectPermanent / https://domain.tld:8087/
</VirtualHost>


Edit: It seems to work on some web browsers, but firefox (on mac) still redirect me to the http site, while firefox on windows & safari redirect me to https ._.










share|improve this question
























  • If it works on some browsers but not others, there might be an old version of the page stored in the browser's cache, or in a caching proxy that's used by the non-redirecting browser. That problem should be fixable by flushing the cache.

    – telcoM
    Feb 7 at 9:12











  • what happens if you use firefox on mac and type in the wanted https: url directly ?

    – X Tian
    Feb 7 at 9:31













1












1








1








I'm trying to redirect bot.domain.tld to https://domain.tld:8087, but it only redirect the domain to http://domain.tld:8087.
The port is only reachable with https so it doesn't work if it doesn't redirect correctly.



Entry in the apache config:



<VirtualHost *:80>
ServerName bot.domain.tld
RedirectPermanent / https://domain.tld:8087/
</VirtualHost>


Edit: It seems to work on some web browsers, but firefox (on mac) still redirect me to the http site, while firefox on windows & safari redirect me to https ._.










share|improve this question
















I'm trying to redirect bot.domain.tld to https://domain.tld:8087, but it only redirect the domain to http://domain.tld:8087.
The port is only reachable with https so it doesn't work if it doesn't redirect correctly.



Entry in the apache config:



<VirtualHost *:80>
ServerName bot.domain.tld
RedirectPermanent / https://domain.tld:8087/
</VirtualHost>


Edit: It seems to work on some web browsers, but firefox (on mac) still redirect me to the http site, while firefox on windows & safari redirect me to https ._.







apache-virtualhost






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 2 '16 at 15:59







Florian

















asked Oct 2 '16 at 14:27









FlorianFlorian

63




63












  • If it works on some browsers but not others, there might be an old version of the page stored in the browser's cache, or in a caching proxy that's used by the non-redirecting browser. That problem should be fixable by flushing the cache.

    – telcoM
    Feb 7 at 9:12











  • what happens if you use firefox on mac and type in the wanted https: url directly ?

    – X Tian
    Feb 7 at 9:31

















  • If it works on some browsers but not others, there might be an old version of the page stored in the browser's cache, or in a caching proxy that's used by the non-redirecting browser. That problem should be fixable by flushing the cache.

    – telcoM
    Feb 7 at 9:12











  • what happens if you use firefox on mac and type in the wanted https: url directly ?

    – X Tian
    Feb 7 at 9:31
















If it works on some browsers but not others, there might be an old version of the page stored in the browser's cache, or in a caching proxy that's used by the non-redirecting browser. That problem should be fixable by flushing the cache.

– telcoM
Feb 7 at 9:12





If it works on some browsers but not others, there might be an old version of the page stored in the browser's cache, or in a caching proxy that's used by the non-redirecting browser. That problem should be fixable by flushing the cache.

– telcoM
Feb 7 at 9:12













what happens if you use firefox on mac and type in the wanted https: url directly ?

– X Tian
Feb 7 at 9:31





what happens if you use firefox on mac and type in the wanted https: url directly ?

– X Tian
Feb 7 at 9:31










2 Answers
2






active

oldest

votes


















0














Have you examined the manual? There are several examples using the mod_rewrite tool with conditionals etc. You may also want to take a look at what not to use mod_rewrite for as well.



Example from the manual:



<VirtualHost *:80>
ServerName www.example.com
Redirect "/" "https://www.example.com/"
</VirtualHost>





share|improve this answer























  • The code still DOESNT redirect to the HTTPS site. :/

    – Florian
    Oct 2 '16 at 15:21


















0














Using https://httpd.apache.org/docs/current/mod/mod_alias.html as a reference, your config file should look like:



<VirtualHost *:80>
ServerName bot.domain.tld
Redirect permanent "/" "https://domain.tld:8087/"
</VirtualHost>






share|improve this answer






















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2funix.stackexchange.com%2fquestions%2f313810%2fredirect-subdomain-to-https-site%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Have you examined the manual? There are several examples using the mod_rewrite tool with conditionals etc. You may also want to take a look at what not to use mod_rewrite for as well.



    Example from the manual:



    <VirtualHost *:80>
    ServerName www.example.com
    Redirect "/" "https://www.example.com/"
    </VirtualHost>





    share|improve this answer























    • The code still DOESNT redirect to the HTTPS site. :/

      – Florian
      Oct 2 '16 at 15:21















    0














    Have you examined the manual? There are several examples using the mod_rewrite tool with conditionals etc. You may also want to take a look at what not to use mod_rewrite for as well.



    Example from the manual:



    <VirtualHost *:80>
    ServerName www.example.com
    Redirect "/" "https://www.example.com/"
    </VirtualHost>





    share|improve this answer























    • The code still DOESNT redirect to the HTTPS site. :/

      – Florian
      Oct 2 '16 at 15:21













    0












    0








    0







    Have you examined the manual? There are several examples using the mod_rewrite tool with conditionals etc. You may also want to take a look at what not to use mod_rewrite for as well.



    Example from the manual:



    <VirtualHost *:80>
    ServerName www.example.com
    Redirect "/" "https://www.example.com/"
    </VirtualHost>





    share|improve this answer













    Have you examined the manual? There are several examples using the mod_rewrite tool with conditionals etc. You may also want to take a look at what not to use mod_rewrite for as well.



    Example from the manual:



    <VirtualHost *:80>
    ServerName www.example.com
    Redirect "/" "https://www.example.com/"
    </VirtualHost>






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Oct 2 '16 at 14:47









    jas-jas-

    72238




    72238












    • The code still DOESNT redirect to the HTTPS site. :/

      – Florian
      Oct 2 '16 at 15:21

















    • The code still DOESNT redirect to the HTTPS site. :/

      – Florian
      Oct 2 '16 at 15:21
















    The code still DOESNT redirect to the HTTPS site. :/

    – Florian
    Oct 2 '16 at 15:21





    The code still DOESNT redirect to the HTTPS site. :/

    – Florian
    Oct 2 '16 at 15:21













    0














    Using https://httpd.apache.org/docs/current/mod/mod_alias.html as a reference, your config file should look like:



    <VirtualHost *:80>
    ServerName bot.domain.tld
    Redirect permanent "/" "https://domain.tld:8087/"
    </VirtualHost>






    share|improve this answer



























      0














      Using https://httpd.apache.org/docs/current/mod/mod_alias.html as a reference, your config file should look like:



      <VirtualHost *:80>
      ServerName bot.domain.tld
      Redirect permanent "/" "https://domain.tld:8087/"
      </VirtualHost>






      share|improve this answer

























        0












        0








        0







        Using https://httpd.apache.org/docs/current/mod/mod_alias.html as a reference, your config file should look like:



        <VirtualHost *:80>
        ServerName bot.domain.tld
        Redirect permanent "/" "https://domain.tld:8087/"
        </VirtualHost>






        share|improve this answer













        Using https://httpd.apache.org/docs/current/mod/mod_alias.html as a reference, your config file should look like:



        <VirtualHost *:80>
        ServerName bot.domain.tld
        Redirect permanent "/" "https://domain.tld:8087/"
        </VirtualHost>







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 3 '16 at 3:42









        GMasterGMaster

        1,7541220




        1,7541220



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • 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%2funix.stackexchange.com%2fquestions%2f313810%2fredirect-subdomain-to-https-site%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

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?