My Oracle Support Banner

Using mod_rewrite Configuration to Change Requests from NON-SSL to SSL, does not Work for Multiple Sites/Virtual Hosts (Doc ID 2691656.1)

Last updated on AUGUST 24, 2023

Applies to:

Oracle HTTP Server - Version and later
Information in this document applies to any platform.


Using mod_rewrite configuration to change requests from non-ssl to ssl, does not work for multiple sites/virtual hosts.
Configuration works for one site but the other site is rewritten back to the first site.

The issue can be seen using the following steps:

1. Set configuration in the OHS Configuration as follows:

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^/(.*)$ https://%{SERVER_NAME}/$1 [R,L]

2. Start OHS.

3. Test requests.

4. Does not work as expected. It is seen that it works for one of the site definitions in a VirtualHost, but not for others.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.