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

Prema
  • 1
  • _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 03 '19 at 00:25
  • Thanks for your comment @MrWhite We're looking into that. The setup is a bit convoluted – Prema Jan 03 '19 at 06:25

0 Answers0