A site we are working on siterequires forcing to https and www removal When we make that happen using this .htaccess code
RewriteCond %{HTTP_HOST} ^www\.
RewriteRule ^(.*)$ https://safe.org.nz%{REQUEST_URI} [L,R=301]
With this enabled, and we access this url http://safe.org.nz/admin <= note http://...... It redirects to https://safe.org.nz instead of https://safe.org.nz/admin
Any ideas ? Thanks very much for any tips
http://safe.org.nz/admin
because the hostname does not startwww.
. If you look at the network traffic you will see a 302 HTTP response code. The directive you posted is a 301. The directives you posted do not "force HTTPS", they simply canonicalise the www subdomain.