Magento HTTPS on all website: urls redirect to homepage
when you change base url to use https it can cause issues when accessing pages via http and instead of redirecting to the https version of the page it redirects to homepage this creating 404s
add this after RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]