I am doing 301 redirects for old sites to a single site, rather then having to add the same RewriteRule more then once, is there a way to say write it once? that way i just need to add the rewriteCond once?
My current code
RewriteEngine on
RewriteCond %{HTTP_HOST} ^Oldsite.local [NC]
RewriteRule ^(.*)$ newSite.local%2 [L,R=301]
RewriteCond %{HTTP_HOST} ^Oldsite2.local [NC]
RewriteRule ^(.*)$ newSite.local%2 [L,R=301]
I tried : RewriteEngine on
RewriteCond %{HTTP_HOST} ^Oldsite.local [NC]
RewriteCond %{HTTP_HOST} ^Oldsite2.local [NC]
RewriteRule ^(.*)$ newSite.local%2 [L,R=301]
but that doesnt seem to work