Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1491

Redirect HTTP to HTTPS on default virtual host without ServerName

$
0
0

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?


Viewing all articles
Browse latest Browse all 1491

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>