onedesign / generator-one-base

A foundation for One Design Company projects on the web.
Other
1 stars 1 forks source link

Added a line to only force SSL on production #118

Closed MikeMcChillin closed 6 years ago

MikeMcChillin commented 6 years ago

I keep running into an issue where when you uncomment the lines you want in your .htaccess file to force SSL, commit the changes and push to prod, everything works great - but it breaks your local setup. This adds a check to only do it when the site's on production.

Already in use here: https://github.com/onedesign/fleetguide/blob/master/public/.htaccess#L23 And here: https://github.com/onedesign/haute-living/blob/dev/public/.htaccess#L275 And here: https://github.com/onedesign/odc-2017-annual-report/blob/feature/filter/public/.htaccess#L23

cmalven commented 6 years ago

Thanks @MikeMcChillin I figured someone would have this issue. I've never run into it because I use valet which uses nginx (and ignores the .htaccess file).