URL redirection not working after changing from http to https

388 Views Asked by At

I have an application deployed in weblogic and OHS (oracle http server) as webserver.

My OHS config looks like below ,when it was working (http)

whenever i give example.domain.com it redirected to http://example.domain.com/forms/frmservlet?config=exmp60

Index.html under htdocs

 <html>
 <head>
   <title>SIFO: example.domain.com</title>
   <meta http-equiv="Refresh" content="0; url=/forms/frmservlet?config=exmp60">
 </head>
 <body>
 </body>
 </html>

Virtual host:

NameVirtualHost *:8888
<VirtualHost *:8888>
  ServerName example.domain.com
  ServerAlias example
  DocumentRoot /opt/weblogic/product/virtualhosts/example.domain.com/htdocs
  RewriteEngine on
  RewriteOptions Inherit
  DirectoryIndex index.html startpage.jsp
</VirtualHost>

Redirection not working after ssl cert configured in virtual host as below.

I had to manually give https://example.domain.com/forms/frmservlet?config=exmp60 in URL to access application

Virtual host:

NameVirtualHost *:4443
<VirtualHost *:4443>
  SSLEngine on
  SSLWallet "${ORACLE_INSTANCE}/config/fmwconfig/components/${COMPONENT_TYPE}/instances/${COMPONENT_NAME}/keystores"
  ServerName example.domain.com
  ServerAlias example
  DocumentRoot /opt/weblogic/product/virtualhosts/example.domain.com/htdocs
  RewriteEngine on
  RewriteOptions Inherit
  DirectoryIndex index.html startpage.jsp
</VirtualHost>

I tried adding below redirect condition to virtual host , but not working

       RewriteEngine on
       RewriteCond %{HTTP_HOST} ^example.domain.com$
       RewriteRule ^ https://example.domain.com/forms/frmservlet?config=exmp60 [R=301,QSA,END]
0

There are 0 best solutions below