Skip to content

Instantly share code, notes, and snippets.

@Kaapiii
Last active November 12, 2019 15:19
Show Gist options
  • Select an option

  • Save Kaapiii/ec2c47adb92f0a51ddc3a3ca04d5767c to your computer and use it in GitHub Desktop.

Select an option

Save Kaapiii/ec2c47adb92f0a51ddc3a3ca04d5767c to your computer and use it in GitHub Desktop.
Apache .htaccess and Nginx redirect all urls of a domain to the same copy on the new domain
RewriteEngine on
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
return 301 https://www.example.com$request_uri;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment