forked from mattheworres/hootdraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
36 lines (28 loc) · 1.14 KB
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<FilesMatch appsettings.php>
Order Allow,Deny
Deny from all
</FilesMatch>
<IfModule mod_rewrite.c>
Options -MultiViews
# Enable the next two lines if your install lives in a subfolder from the domain base directory
#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>