I am new to apache rewrite rules; I am writing the rules for 301 redirects for redirecting an old site's pages to new site. Please find below the rules --
#1
RewriteCond %{HTTP_HOST} ^(www-stage\.)?newsite\.com.au$ [NC]
RewriteCond %{REQUEST_URI} ^/a/b/c.html$ [NC,OR]
RewriteCond %{REQUEST_URI} ^/x/y/z.html$ [NC,OR]
RewriteCond %{REQUEST_URI} ^/p/q/r.html$ [NC]
RewriteRule (.*) /f/g/h.html [L,R=301]
#2
RewriteCond %{HTTP_HOST} ^(www-stage\.)?newsite\.com.au$ [NC]
RewriteCond %{REQUEST_URI} ^/q/w.html$ [NC,OR]
RewriteCond %{REQUEST_URI} ^/i/n/s.html$ [NC]
RewriteRule (.*) /s/d/f/g.html [L,R=301]
for every new page; I am first matching the domain; and matching all the old pages' URL and redirecting to the new page's URL. There are around 120-130 urls that need to be redirected
Is this the correct way; or the rules can be made more optimized ?