title: Force https and www to non www through htaccess in any URL of the host
body: <p>Through this code in the .htaccess file:</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{HTTP_HOST} ^www\.muscleshop\.mx [NC]
  RewriteRule ^(.*)$ https://muscleshop.mx/.(.*) [L,R=301]
  </code></pre>
  
  <p>I've been able to force https and www to non www but with URL's like this: <a href="http://www.muscleshop.mx/productos/acidos-grasos-esenciales" rel="nofollow noreferrer">http://www.muscleshop.mx/productos/acidos-grasos-esenciales</a> the code redirects to home page. I really would appreciate any advice to achieve forcing https and www to non www in ANY URL of the host. Thank you.</p>