Skip to content

Instantly share code, notes, and snippets.

@panoply
Last active May 29, 2016 23:09
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 panoply/85b2998643611801647c to your computer and use it in GitHub Desktop.
Save panoply/85b2998643611801647c to your computer and use it in GitHub Desktop.
.htaccess rewrite for Laravel 5 with Shopify Proxy on using a Fortrabbit domain.
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Addition: Force SSL
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

This will force SSL for applications using Fortrabbit domain name (*.frb.io) within a Shopify Proxy. If you ever find yourself using Fortrabbit on Laravel 5+ and building a Shopify Application, when initaiting your application or "snippet" with Laravel 5+ your proxy page will spit back a download option because you will be sending your headers with an "application/liquid" content type.

Use this in your .htaccess file, it will fix that shit up.– I spent weeks trouble shooting this utter faggotry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment