Title: wordpress 4.1 https redirect loop reverse proxy
Last modified: August 22, 2016

---

# wordpress 4.1 https redirect loop reverse proxy

 *  Resolved [tobros91](https://wordpress.org/support/users/tobros91/)
 * (@tobros91)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/wordpress-41-https-redirect-loop-reverse-proxy/)
 * So this is driving me nuts, having a costumer with a wordpress shop, using version
   3.4.1 for a long time with no issues. Last december they wanted to upgrade to
   wordpress 4.0. We did what we thought would be a simple upgrade on the test server
   but got in a world of pain.
 * Every single request to public pages and admin gets in to redirect loops. I am
   no server guy and this is hard for me to understand. The server setup is as following
   described from the server company.
 * User-> Exteral www server -> datacenter HA-proxy -> internal http server -> testing
   server
 * The testing server is running apache.
 * The server is configured so that all request is forced to go via https. So lets
   say we try go access [http://example.com/style.css](http://example.com/style.css)
   the server will show https.
 * Today we tried again with wordpress 4.1 and a fresh install. After the install
   no js och css files gets included with https and it is not possible to log in
   to admin.
 * Changed siteurl and home variable in database to use https, but still the page
   wants to include all assets with http. Going to wp-admin results in a redirect
   loop.
 * Tried different combinations of http and https for the siteurl and home variable
   in the wp-options table with defining every possible combination of things in
   wp-config
 *     ```
       define('FORCE_SSL_ADMIN', true);
       define('FORCE_SSL_LOGIN', true);
   
       define('WP_HOME','https://example.com');
       define('WP_SITEURL','https:///example.com'); 
   
       if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on';
       ```
   
 * Does anyone know what to start looking into, can this be solved with code on 
   our side or should the hosting companies look over their setup even more?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [JaBurd](https://wordpress.org/support/users/jaburd/)
 * (@jaburd)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/wordpress-41-https-redirect-loop-reverse-proxy/#post-5713519)
 * We are experiencing the exact same issue. Have you made any progress?
 *  Thread Starter [tobros91](https://wordpress.org/support/users/tobros91/)
 * (@tobros91)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/wordpress-41-https-redirect-loop-reverse-proxy/#post-5713540)
 * Yes i found a way to solve this now, so simple that it is not even funny… haha
 * Removed all the other code and just added.
 *  `$_SERVER['HTTPS']='on`
 * Hope this works for you too.
 *  [muideengoldfinger](https://wordpress.org/support/users/muideengoldfinger/)
 * (@muideengoldfinger)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/wordpress-41-https-redirect-loop-reverse-proxy/#post-5713547)
 * [@tobros91](https://wordpress.org/support/users/tobros91/), please where exactly
   did you “removed all other codes and just added
    `$_SERVER['HTTPS']='on` ?
 * Thanks.
 *  [JaBurd](https://wordpress.org/support/users/jaburd/)
 * (@jaburd)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/wordpress-41-https-redirect-loop-reverse-proxy/#post-5713549)
 * Literally remove the other lines and only leave the line
 * `$_SERVER['HTTPS']='on'` in your wp-config.php file.
 * That kinda worked for us as well. However, due to our environment behind a load
   balancer we’re unable to control this wasn’t the ultimate solution. What did 
   resolve our issue was by adding the following plugin:
 * [http://snippets.webaware.com.au/snippets/wordpress-is_ssl-doesnt-work-behind-some-load-balancers/](http://snippets.webaware.com.au/snippets/wordpress-is_ssl-doesnt-work-behind-some-load-balancers/)
 * This resolved all the issues we were having.
 *  Thread Starter [tobros91](https://wordpress.org/support/users/tobros91/)
 * (@tobros91)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/wordpress-41-https-redirect-loop-reverse-proxy/#post-5713551)
 * And not all other lines like in other wp-config standard stuff, just the other
   lines i added there while testing. So a standard wp-config.php and just add $
   _SERVER[‘HTTPS’]=’on

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘wordpress 4.1 https redirect loop reverse proxy’ is closed to new replies.

## Tags

 * [redirect loop](https://wordpress.org/support/topic-tag/redirect-loop/)
 * [reverse proxy](https://wordpress.org/support/topic-tag/reverse-proxy/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [tobros91](https://wordpress.org/support/users/tobros91/)
 * Last activity: [11 years, 3 months ago](https://wordpress.org/support/topic/wordpress-41-https-redirect-loop-reverse-proxy/#post-5713551)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
