Redirect a particular context-root to HTTPS automatically in Apache HTTPD.
Issue
- Unable to automatically redirect HTTP URLs to HTTPS for individual sites on this server. It has multiple web sites being hosted on this server, but it needs to redirect for just one site (CONTEXT) to HTTPS. If the HTTP URL and the HTTPS URL is typed manually, both sites are displayed, but requirement is to redirect automatically from HTTP URL to HTTPS for one site. For Example :
From :
http://localhost/CONTEXT/
To :
https://localhost/CONTEXT/
Environment
- Red Hat JBoss Web Server (JWS)
- 1.x, 2.x, 3.x (HTTPD)
- Red Hat Enterprise Linux (RHEL)
- 5.x, 6.x, 7.x (httpd2.2.x, httpd2.4.x)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
