Apache Mod Rewrite
Rewrite rule structure:
RewriteRule pattern target [Flag1,Flag2,Flag3]
Flags are included in square brackets at the end of the rule, and multiple flags are separated by commas.
|L||Stop the rewriting process immediately and don’t apply any more rules.|
|NC||No Case. Use of the
# Redirect everything to a new domain and/or path: RewriteRule ^(.*)$ https://mydomain.com/path/ [R=302,L] # Redirect everything at a specific path to a new domain and/or path: RewriteRule ^/some/path/$ https://mydomain.com/path/ [R=302,L]