Redirect not working when using https

I am using virtual host to redirect but it does not seem to work when I type the url in the browser with https://

if I use http:// in the browser, the redirect works perfectly

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

The http and https sites will be specified separately in your Apache configuration. If you have configured the redirect in your virtualhost file you’ll need to make sure it appears in both the http and https virtualhosts. If you are using an .htaccess file you’ll need to make sure that both VirtualHosts have “AllowOverride All” set which allows apache to process directives in .htaccess files.