Skip to content

Instantly share code, notes, and snippets.

@aschempp
Last active August 9, 2023 09:35
Show Gist options
  • Save aschempp/5245299 to your computer and use it in GitHub Desktop.
Save aschempp/5245299 to your computer and use it in GitHub Desktop.
Force use of www. domain
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,NC,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment