Skip to main content
4 of 10
deleted 6 characters in body
Simon Hayter
  • 33.1k
  • 7
  • 60
  • 119

Apache Rewrite Rule non-www to www + http to https + remove trailing slash

I would like to accomplish the following:

  • rewrite non-www to www
  • redirect from HTTP to HTTPS
  • remove trailing slash

e.g. http://example.com should redirect to https://www.example.com

How would you structure a set of rules to do all of the above?

DD.
  • 549
  • 1
  • 6
  • 18