0

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

2
  • Something else would seem to be doing that. The directives you posted won't redirect http://safe.org.nz/admin because the hostname does not start www.. 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.
    – MrWhite
    Jan 3, 2019 at 0:25
  • Thanks for your comment @MrWhite We're looking into that. The setup is a bit convoluted
    – Cloudworks
    Jan 3, 2019 at 6:25

0

You must log in to answer this question.

Browse other questions tagged .