Skip to content

Instantly share code, notes, and snippets.

@patrickgilmour
Last active October 12, 2015 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patrickgilmour/4bf4dc315e182bccb218 to your computer and use it in GitHub Desktop.
Save patrickgilmour/4bf4dc315e182bccb218 to your computer and use it in GitHub Desktop.
MAMP - Force Host to use https for all pages using rewrites in MAMP
# Paste the following into the Additional Parameters for <Virtual Host> field of the "Hosts" tab in MAMP (Pro)
# Restart MAMP
# Now when you type http://thishost MAMP with forward the request to https://thishost
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment