On my apache server I'd like to be able to redirect all incoming http requests to the equivalent https request. The catch is that I'd like to be able to do this for my default virtual host without specifying the ServerName
and have the redirect work with whatever server name appeared in the request url. I'm hoping for something like this:
NameVirtualHost *:80
<VirtualHost *:80>
RedirectPermanent / https://%{SERVER_NAME}/
...
</VirtualHost>
Is this possible using Redirect
or will I have to resort to Rewrite
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…