0

I have recently started switching all my sites to SSL, locally using Mamp Pro virtual hosts and self-sign certificates.

All works fine with one exception: if I type local.domainname.co.uk in a browser I get a 403 error, unless I type the full https:// first, then it works fine. On the live site it all works as expected; type domainname.co.uk and the browser fills in the https:// for me. These are drupal sites using htaccess module to force the ssl - but since it works live but not local I'm assuming its a mamp issue?

iain-g
  • 93
  • 1
  • 8
  • 1
    Possible duplicate of [Mamp Pro 4 HTTP and HTTPS](http://stackoverflow.com/questions/40077934/mamp-pro-4-http-and-https) – Elie Faës Feb 15 '17 at 10:27
  • Don't think it's a duplicate - I didn't want mixed http and https, I wanted pure https. Just had to have http in order to redirect to https – iain-g Feb 15 '17 at 13:11
  • The answers are the same, I think it might be a duplicate because even if you don't really need both for your application, you actually need them to redirect one to another. They highlight the same issue, and the answer is the same. I'll a let a moderator decide wether it is or not a duplicate, nothing personal ;) – Elie Faës Feb 15 '17 at 13:15

1 Answers1

0

Solved this - I needed to set up a non-SSL host in MAMP with the same name and settings as the SSL host (with SSL unchecked obviously) - although I want the site all https, there still needs to be an http host so it can re-direct to ssl (until browsers default to https at some point in the future?). MAMP instructions.

Or don't bother if you can live with typing https:// every time!

iain-g
  • 93
  • 1
  • 8