Skip to content

Instantly share code, notes, and snippets.

@refactorsaurusrex
Last active January 7, 2020 18:45
Show Gist options
  • Save refactorsaurusrex/6b7d86cb2b7374e3a8b7b55517d1ecce to your computer and use it in GitHub Desktop.
Save refactorsaurusrex/6b7d86cb2b7374e3a8b7b55517d1ecce to your computer and use it in GitHub Desktop.

Revisions

  1. refactorsaurusrex revised this gist Jan 7, 2020. No changes.
  2. Nick Spreitzer revised this gist Jun 3, 2018. No changes.
  3. Nick Spreitzer created this gist Jun 3, 2018.
    7 changes: 7 additions & 0 deletions .htaccess
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    RewriteEngine On

    RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
    RewriteRule ^(.*)$ http://example.com%{REQUEST_URI} [R=301]

    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://example.com%{REQUEST_URI} [R=301]