Skip to content

Instantly share code, notes, and snippets.

@zo0o0ot
Created November 14, 2017 02:44
Show Gist options
  • Save zo0o0ot/f81d3c22a1bf2783ced1743a6787042c to your computer and use it in GitHub Desktop.
Save zo0o0ot/f81d3c22a1bf2783ced1743a6787042c to your computer and use it in GitHub Desktop.
<FilesMatch appsettings.php>
Order Allow,Deny
Deny from all
</FilesMatch>
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
# Comment next line to disable forcing of HTTPS for all pages:
# (it is strongly recommended you *keep* this setting enabled!)
#RewriteCond %{HTTPS} off
#RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#H/T to anubhava http://stackoverflow.com/a/29874382/324527
DirectoryIndex bootstrap.php index.html
Options +FollowSymLinks
RewriteEngine on
# redirect all api calls to /api/bootstrap.php
RewriteRule ^api/((?!bootstrap\.php$).+)$ api/bootstrap.php [L,NC]
# If the request is a file, folder or symlink that exists, or is for the mail server, serve it up
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
#RewriteCond %{SERVER_PORT} ^1025$
#RewriteCond %{SERVER_PORT} ^1080$
RewriteRule ^ - [L]
# otherwise, serve your index.html app
RewriteRule ^(.+)$ index.html [L]
</IfModule>
@zo0o0ot
Copy link
Author

zo0o0ot commented Nov 14, 2017

@mattheworres Here's the .htaccess file that I'm using for leagify.me

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