Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Where's the code for that? You are only redirecting requests starting with www Commented Aug 20, 2019 at 8:52
  • I've a index.php that handle with the requests, my only issue is that only the www was redirecting to https as you pointed, and as my knowledge in htaccess is really poorly I stucked with this problem, to redirect the http, something like this %{HTTP_HOST} ^http.(.*) [NC] exist ? Commented Aug 20, 2019 at 9:18
  • 1
    You should check the vocabulary ;) HTTP_HOST contains the host. That might start with http, but that is not common. Usually it contains www.domain.com Commented Aug 20, 2019 at 9:46
  • Possible duplicate of Redirect non-www to www in .htaccess Commented Aug 20, 2019 at 9:46
  • Possible duplicate of .htaccess redirect www to non-www with SSL/HTTPS Commented Aug 20, 2019 at 17:55