[Support request] Redirect loop is torturing me, please help!

Home Forums Redirect loops Redirect loop is torturing me, please help!

This topic contains 1 reply, has 2 voices, and was last updated by  Mark Wolters 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #116663 Reply

    Dmitry

    Hi guys,

    I am using WP on Bitnami stack hosted in AWS which uses a load balancer.

    I am using the following config in httpd-vhosts.conf file to do www to non-www redirects and all works fine.

    <VirtualHost *:80>
    ServerName boardgamesland.com
    ServerAlias http://www.boardgamesland.com
    RewriteEngine On
    # This first rule is to remove the www. We already redirect to https
    RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
    RewriteRule ^(.*)$ https://%1$1 [R=permanent,L]
    # This second rule is to force https
    RewriteCond %{HTTP:X-Forwarded-Proto} =http
    RewriteRule .* https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]
    DocumentRoot “/opt/bitnami/apps/wordpress/htdocs”
    Include “/opt/bitnami/apps/wordpress/conf/httpd-app.conf”
    </VirtualHost>

    Now on top of it, I have installed Really Simple SSL and once I enable it, I get the redirect loop.

    So in essence, I can comment the above code out and have http->https redirect with your plugin working. Alternatively, I can disable the plugin and leave the above code in place which will ensure www to non-www works, but I cannot have them both working at the same time.

    Please help

    #116851 Reply

    Mark Wolters
    Keymaster

    Hi Dmitry,

    can you try to add the following line to your wp-config.php file:

    $_SERVER["https"] = "on"

    to see if that resolves the issue? Would it be possible to disable all redirect options in the Really Simple SSL settings so that your httpd-vhosts.conf takes care of the https:// redirect?

    Mark

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Redirect loop is torturing me, please help!
Your information: