Cool Solutions

Redirecting HTTP requests to HTTPS


July 21, 2014 1:12 pm





Here’s how to redirect a request from http to https using Apache’s mod_redirect module in a cluster-configured Filr that is fronted by Apache.

Prerequisite: Apache should be SSL enabled.

For redirecting the request from http to https we need to use apache’s mod_redirect module.

By default, SUSE doesn’t enable the mod_rewrite module.

Follow these steps to install it.


  • Edit the file /etc/sysconfig/apache2 as root
  • Locate the following line:


  • Then add the following lines:


    The end result should look similar to the following:

    APACHE_MODULES="authz_host actions alias auth_basic authz_groupfile authn_file authz_user autoindex cgi dir include log_config mime negotiation rewrite setenvif status userdir asis imagemap ssl reqtimeout authz_default proxy proxy_ajp proxy_balancer"
  • Save the changes and quit
  • run SUSEconfig to update the apache configuration files
  • run /etc/init.d/apache2 restart to restart the Apache server
  • Then for redirecting the http request to https add the following line in file etc/apache2/httpd.conf

    RewriteEngine On
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteRule !/status https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

  • Save the file
  • Restart the apache server
3 votes, average: 4.67 out of 53 votes, average: 4.67 out of 53 votes, average: 4.67 out of 53 votes, average: 4.67 out of 53 votes, average: 4.67 out of 5 (3 votes, average: 4.67 out of 5)
You need to be a registered member to rate this post.

Tags: , ,
Categories: Filr, Filr TKB, Technical


Disclaimer: This content is not supported by Micro Focus. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.