Skip to content

Commit 8030b7c

Browse files
Create nginx.conf
1 parent b6c0427 commit 8030b7c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

config/heroku/nginx.conf

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
location / {
2+
# try to serve file directly, fallback to rewrite
3+
try_files $uri @rewriteapp;
4+
}
5+
6+
location @rewriteapp {
7+
# rewrite all to index.php
8+
rewrite ^(.*)$ /index.php/$1 last;
9+
}
10+
11+
location ~ ^/index\.php(/|$) {
12+
try_files @heroku-fcgi @heroku-fcgi;
13+
# ensure that /index.php isn't accessible directly, but only through a rewrite
14+
internal;
15+
}

0 commit comments

Comments
 (0)