【发布时间】:2018-01-31 12:51:04
【问题描述】:
我正在尝试将 HTTP 流量重定向到我服务器上的 HTTPS。
我有 this.example.net、that.example.net 和 etc.example.net 的证书,并且我的 DNS 接受通配符。我想使用通配符将 HTTP 永久重定向到 HTTPS。
我试过了:
<VirtualHost *:80>
ServerName example.net:80
ServerAlias *.example.net
ServerAdmin mark@example.net
RedirectMatch 301 (.*) https://$1.example.net
</VirtualHost>
但这不起作用。
我知道我可以通过这种方式设置单独的子域,但是可以使用通配符吗?
【问题讨论】:
-
这能回答你的问题吗? redirect all subdomains from http to https
标签: apache redirect wildcard virtualhost