Skip to content

Instantly share code, notes, and snippets.

@PeteLawrence
Created November 23, 2017 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PeteLawrence/15a18b1505e64ca096f4e65ebe063eb6 to your computer and use it in GitHub Desktop.
Save PeteLawrence/15a18b1505e64ca096f4e65ebe063eb6 to your computer and use it in GitHub Desktop.
Redirect a LetsEncrypt secured domain
#
# Redirects an entire domain to a new domain
# Includes an exception that allows LetsEncrypt to check for its validation file
#
RewriteEngine On
# Exception for the LetsEncrypt validation file
RewriteRule ^(.well-known) - [L]
# Redirect all pages to the same URL on the goodlifelakedistrictcottages.co.uk site
RewriteRule ^ https://www.goodlifelakedistrictcottages.co.uk%{REQUEST_URI} [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment