Skip to content

Instantly share code, notes, and snippets.

@jtarleton
Created February 6, 2023 23:59
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 jtarleton/2f96727ed6397ad9f0faefbb705c1863 to your computer and use it in GitHub Desktop.
Save jtarleton/2f96727ed6397ad9f0faefbb705c1863 to your computer and use it in GitHub Desktop.
Redirecting one domain to another with mod_rewrite
# Redirect old.org.il to www.new.org/he
# test at: https://htaccess.madewithlove.com/
RewriteCond %{HTTP_HOST} ^old\.org\.il$ [OR]
RewriteCond %{HTTP_HOST} ^\w+\.old\.org\.il$
RewriteRule ^(.*)$ https://www.new.org/he/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment