RewriteEngine On
RewriteCond %{SERVER_PORT} 80
#RewriteRule ^(.*)$ https://wartoncorporation.com/$1 [R,L]

#301 redirect all subpages to the frontpage
RewriteCond %{HTTP_HOST} !^(.*)\.wartoncorporation\.com$ [NC] 
RewriteRule ^(.*)$ https://wartoncorporation.com/ [R=301,L]

RewriteCond %{REQUEST_URI} !"^/$"
RewriteRule (.+) http://%{HTTP_HOST}/ [R=301,L]
