Redirect subdomain to https site
Clash Royale CLAN TAG#URR8PPP
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
add a comment |
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
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
add a comment |
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
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
apache-virtualhost
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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>
The code still DOESNT redirect to the HTTPS site. :/
– Florian
Oct 2 '16 at 15:21
add a comment |
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>
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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>
The code still DOESNT redirect to the HTTPS site. :/
– Florian
Oct 2 '16 at 15:21
add a comment |
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>
The code still DOESNT redirect to the HTTPS site. :/
– Florian
Oct 2 '16 at 15:21
add a comment |
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>
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>
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
add a comment |
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
add a comment |
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>
add a comment |
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>
add a comment |
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>
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>
answered Oct 3 '16 at 3:42
GMasterGMaster
1,7541220
1,7541220
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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