Created
February 6, 2023 23:59
-
-
Save jtarleton/2f96727ed6397ad9f0faefbb705c1863 to your computer and use it in GitHub Desktop.
Redirecting one domain to another with mod_rewrite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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