title: htaccess wildcard subdomain redirect with https non www
body: <p>I have searched and search to no avail. If there is already an answer out there, please let me know.</p>
  
  <p>But I am trying to redirect wildcard subdomains to a specific file with a GET request. At the same time need to redirect to https and non WWW</p>
  
  <p>For Example:<br />
  <code>http://user1.example.com -&gt; https://example.com/index.php?user=user1</code>
  <code>https://user2.example.com -&gt; http://example.com/index.php?user=user2</code></p>
  
  <p>Any help will be forever grateful and thank you in advance!</p>