Home>

Environment
Sakura's VPS CentOS 6.10
Apache/2.2.15
PHP 5.4.45

Thank you.
The other day I asked a question about SSL, https redirect without www,
Finally get a certificate for both domains with www without www with LetsEncrypt for free
With the description of Rewrite below, I was able to redirect to https://example.com/ without www.

RewriteEngine on
RewriteCond% {HTTPS} off
RewriteRule ^ (. *) Https://example.com/$1 [R = 301, L]
RewriteCond% {HTTP_HOST}! ^ Example \ .com $[NC]
RewriteRule ^ (. *) Https://example.com/$1 [R = 301, L]

The following redirect has been implemented in the above description.
example.com ⇒ https://example.com/ 301 redirect OK
http://example.com ⇒ https://example.com/ 301 redirect OK
www.example.com ⇒ https://example.com/ 301 redirect OK
https://www.example.com ⇒ https://example.com/ 301 redirect OK

However, this redirect has caused problems.
Because this site has been published for several years, SSL has been implemented and it is now accessible via https.
From the beginning, Alias ​​had the following structure.

Alias ​​/ kantou/var/www/html/List/kantou
* Same content is 10 in Kansai, Tohoku, etc.

The following URL is implemented with the above settings
http://example.com/kantou/

It is actually the following URL, but "List" is hidden by Alias.
http://example.com/List/kantou/

However, after SSL is enabled, if you access the following link, Alias ​​will not work and "List" will be displayed.
http://example.com/kantou/
↓ The part hidden in the Alias ​​of https is displayed as shown below.
https://example.com/List/kantou/

When I examined it, there was an article that Alias ​​stopped working when redirecting etc.
In fact, before SSL was implemented, redirection without www was implemented from the beginning, and Alias ​​worked without problems.

http://example.com/kantou/ Alias ​​enabled for this non-SSL link
Without displaying "List" part
Can you make it accessible at https://example.com/kantou/ that supports SSL?

Requirements are
I want to be able to access the page where Alias ​​is set below the hierarchy with https without www with Alias ​​enabled.
Even if you access the page below the hierarchy even if it is in the state of http without s or http: //
Prevent redirects without https: // www from being hidden by Alias.

Thanks for your patience.