I recently moved to https from http and i have a redirect chain that shows up in safari slowing down the load time of my site.
I've spent several days with bluehost and it seems no one knows/is willing to help re-write to the .htaccess file, it's also possibly not their job either, so fair enough. I've spend several hours myself and I now have a rough understanding but still could use a bit of help.
My preferred domain is https://jambarteambuilding.com
the redirect chain in safari is http://www.jambarteambuilding.com then to https://www.jambarteambuilding.com then to https://jambarteambuilding.com
What im aiming for is
http://www.jambarteambuilding.com
http://jambarteambuilding.com
https://www.jambarteambuilding.com
all to redirect to
https://jambarteambuilding.com
also.
My website and wordpress install is housed in a subdirectory called 'clean'. So public_html/clean where you will find wp-admin, wp-content, wp-includes.
my .htaccess file is written so that if you type jambarteambuilding.com the website loads from the clean but you don't see jambarteambuilding.com/clean in the URL only jambarteambuilding.com (which is what i prefer).
So
This is my current .htaccess file.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?jambarteambuilding.com$
RewriteCond %{REQUEST_URI} !^/clean/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /clean/$1
RewriteCond %{HTTP_HOST} ^(www.)?jambarteambuilding.com$
RewriteRule ^(/)?$ clean/index.php [L]
My feeling is that I need to write an [OR] statement after line 2 to capture https://www.jambarteambuilding.com
in the conditions.
[NC]seems to be missing from line 2 and 7
R=301 seems to be missing form line 6 and 8
line 2 and 7 seem to be duplicated.
the jambarteambuilding.com should be jambarteambuilding.com
Im guessing that (www.)? means 'with or without www'
Could anyone easily help rewrite this for me!