Home .Htaccess redirect breaks file path
 I'm attempting to canonicalization my URL. However, when adding the relevant code, it breaks my other rewrite rules which allows me to hide the .html/ .php. It works fine when landing on the homepage but when you go to a page with www. and a file path at the end of the URL the page redirects to the homepage without www. RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$/index.php?path=$1 [NC,L,QSA] RewriteCond %{HTTP_HOST} ^www\.bespoke-apertures\.co.uk$[NC] RewriteRule (.*) https://bespoke-apertures.co.uk/$1 [R=301,L]