From 7c719c7506850d8285f7f3b0466816293c056597 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sat, 7 Feb 2015 20:57:07 +0100 Subject: Removing trailing slashes is no longer necessary --- README.md | 10 ++-------- index.php | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a010ea9..b2399f0 100644 --- a/README.md +++ b/README.md @@ -11,15 +11,9 @@ Its intuitive interface lets you use it efficiently from the start. See the Usag * If you're going to use this application for sensitive data, you should seriously consider using HTTPS. -* We need to remove trailing slashes from requests. For nginx, this means something like: +* Every request that is not a file or directory itself should link back to /index.php. The query string should be left intact. For nginx, this means: - rewrite ^/(.*)/$ /$1 permanent; - - In the appropriate server / location block. - -* Every request that is not a file itself should link back to /index.php. The query string should be left intact. For nginx, this means: - - try_files $uri /index.php$is_args$query_string; + try_files $uri $uri/ /index.php$is_args$query_string; In the appropriate location block. diff --git a/index.php b/index.php index a27f054..16f3274 100644 --- a/index.php +++ b/index.php @@ -36,7 +36,7 @@ $_request = str_replace(constants::url_internal, '', $_request); // This is the REQUEST_URI switch // The default shows a 404 page $pages = array( - '' => './include/home.php', + '/' => './include/home.php', '/clients' => './include/clients.php', '/clients/new' => './include/clients-new.php', '/clients/edit' => './include/clients-edit.php', -- cgit v1.2.3