Title: HTTPS when using &#8220;WordPress on Linux&#8221; Azure Web app
Last modified: November 1, 2018

---

# HTTPS when using “WordPress on Linux” Azure Web app

 *  [hasselrot](https://wordpress.org/support/users/hasselrot/)
 * (@hasselrot)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/https-when-using-wordpress-on-linux-azure-web-app/)
 * Hi!
 * I have been fiddling around with Azure web apps lately, and trying to setup a
   WordPress app.
 * It seems that when using “WordPress on Linux”, enforcing HTTPS is not working.
   The forms in wp-login.php is still pointing to http and so the browsers block
   it. Thus making it impossible to login.
 * This is not the case when using the “WordPress” app. It seems to work very well
   using that one.
 * `<form name="loginform" id="loginform" action="http://wplinux123.azurewebsites.
   net/wp-login.php" method="post">`

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

 *  [cleancoded](https://wordpress.org/support/users/cleancoded/)
 * (@cleancoded)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/https-when-using-wordpress-on-linux-azure-web-app/#post-10837992)
 * If you host a WordPress site on Azure Web App on Linux running Apache, here are
   the steps to implement an HTTP to HTTPS redirect:
 * 1. Add RewriteRule in .htaccess in WordPress application root:
 *     ```
        RewriteCond %{HTTP:X-ARR-SSL} ^$
        RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
       ```
   
 * 2. Once this RewriteRule is added, you may see your /wp-admin page displaying
   like this, which is caused by loading mixed content from http and https:
 * > [View post on imgur.com](https://imgur.com/a/hkYmIG5)
 * 3. Next, add the following code in your `wp-config.php` file:
 *     ```
       define('FORCE_SSL_ADMIN', true); 
       if ( isset($_SERVER['HTTP_X_ARR_SSL']) ) 
               $_SERVER['HTTPS']='on';
       ```
   
 *  Thread Starter [hasselrot](https://wordpress.org/support/users/hasselrot/)
 * (@hasselrot)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/https-when-using-wordpress-on-linux-azure-web-app/#post-10839129)
 * Hi!
 * Thank you, I will give this a try!
 * I am wondering, since both apps are provided by WordPress.
    How come the one 
   called “WordPress on Linux” is not preconfigured with this, when the other one
   is?

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

The topic ‘HTTPS when using “WordPress on Linux” Azure Web app’ is closed to new
replies.

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [linux](https://wordpress.org/support/topic-tag/linux/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [hasselrot](https://wordpress.org/support/users/hasselrot/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/https-when-using-wordpress-on-linux-azure-web-app/#post-10839129)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
