Try adding this in your vhost config:
RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
More Related Contents:
- htaccess redirect to https://www
- Https to http redirect using htaccess
- How do you redirect HTTPS to HTTP?
- Force HTTPS on certain URLs and force HTTP for all others
- How to redirect all HTTP requests to HTTPS
- apache redirect from non www to www
- Why do HTTP servers forbid underscores in HTTP header names
- RewriteRule Last [L] flag not working?
- How do I allow HTTPS for Apache on localhost?
- Apache redirect to another port
- Redirect site with .htaccess but exclude one folder
- How to CORS-enable Apache web server (including preflight and custom headers)?
- How to force https on elastic beanstalk?
- Are square brackets permitted in URLs?
- Apache 2.4 + PHP-FPM and Authorization headers
- Apache2 ProxyPass for Rails App Gitlab
- How to redirect URLs based on query string?
- mod_rewrite: remove trailing slash (only one!)
- Remove Characters from URL with htaccess
- How to redirect all HTTP requests to HTTPS using .htaccess rules?
- Spring Boot redirect HTTP to HTTPS
- How can I pre-compress files with mod_deflate in Apache 2.x?
- How to stop Chrome from redirecting to HTTPS?
- CSS, JS and images do not display with pretty url
- mod_rewrite: remove query string from URL?
- Apache rewrite based on subdomain
- Vagrant’s port forwarding not working [closed]
- RewriteCond to match query string parameters in any order
- htaccess RewriteRule page with query string
- The Redirection of Multiple Parked Domains doesn’t Work with Filename [closed]