Skip to content

Commit 0686e0f

Browse files
committed
* Add 404 handler
1 parent 0e5d4d0 commit 0686e0f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

forge-example/NginxConfiguration.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ server {
1010
index index.html index.htm index.php;
1111
charset utf-8;
1212

13+
# 404 error handler
14+
error_page 404 /index.php?$query_string;
15+
1316
# 301 Redirect URLs with trailing /'s as per https://webmasters.googleblog.com/2010/04/to-slash-or-not-to-slash.html
1417
rewrite ^/(.*)/$ /$1 permanent;
1518

sites-available/somedomain.com.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ server {
3737
index index.html index.htm index.php;
3838
charset utf-8;
3939

40+
# 404 error handler
41+
error_page 404 /index.php?$query_string;
42+
4043
# 301 Redirect URLs with trailing /'s as per https://webmasters.googleblog.com/2010/04/to-slash-or-not-to-slash.html
4144
rewrite ^/(.*)/$ /$1 permanent;
4245

0 commit comments

Comments
 (0)