title: www redirection not working on Wordpress on Openshift
body: <p>I've setup a wordpress application on Openshift and I added 2 aliases (www.mysite.ma - mysite.ma). I followed the instructions to create a CNAME record, and I did so using CloudFlare. I've also changed my wordpress settings for the new URL.</p>
  
  <p>My DNS Records on CloudFlare :</p>
  
  <pre><code>www -&gt; myapp.rhcloud.com
  @ -&gt; myapp.rhcloud.com 
  </code></pre>
  
  <p>When I visit <strong>www.mysite.ma</strong>, I can see my normal Wordpress site. But when I go to <strong>mysite.ma</strong>, it returns a 404 error with a changed link (<strong><a href="https://mysite.ma/app" rel="nofollow">https://mysite.ma/app</a></strong>)</p>
  
  <p>I tried to modify my .htaccess file to the following :</p>
  
  <pre><code>RewriteEngine on 
  
  # Uncomment the following lines to force HTTPS
  #RewriteCond %{HTTP:X-Forwarded-Proto} !https 
  #RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
  
  # WordPress Defaults
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  
  
  # BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  
  
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  RewriteCond %{HTTP_HOST} !www.mysite.ma$ [NC]
  RewriteRule ^(.*)$ http://www.mysite.ma/$1 [L,R=301]
  &lt;/IfModule&gt;
  
  # END WordPress
  </code></pre>
  
  <p>But nothing changed, even when I do a ping request to <strong>www.mysite.ma</strong> and <strong>myapp.rhcloud.com</strong> I get the same IP Adress, not for <strong>mysite.ma</strong></p>
  
  <p>Thanks.</p>