Can anyone please tell me if this is the correct order for these domain rewrites? im not sure what should come first to minimise the number of redirects. I find it all confusing :)
#####http to https
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ [
%{HTTP_HOST}%{REQUEST_URI}...] [L,R=301]
##### Resolve index.html to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]*/)*index\.html? [NC]
RewriteRule ^(([^/]*/)*)index\.html?$ [
domain.com...] [R=301,L]
# remove multiple slashes anywhere in url
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . [
domain.com%1...] [R=301,L]
# Redirect to remove multiple slashes before URL-path
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ //+([^\ ]*)
RewriteRule .* [
domain.com...] [R=301,L]
##### Resolve canonical domains
RewriteCond %{HTTP_HOST} !^(www\.domain\.com)?$
RewriteRule ^(.*)$ [
domain.com...] [R=301,L]