From b793b2d59476a9cd3de26e861b4b1b29499b232d Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Wed, 20 Sep 2017 11:18:39 -0400 Subject: [PATCH] moved index to controller file --- .htaccess | 2 +- controllers/people.php | 8 ++++++++ controllers/person.php | 0 data/people.php | 2 +- index.php | 6 ------ 5 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 controllers/people.php delete mode 100644 controllers/person.php diff --git a/.htaccess b/.htaccess index de7b09f..a3ff53d 100644 --- a/.htaccess +++ b/.htaccess @@ -1,6 +1,6 @@ RewriteEngine On RewriteCond %{REQUEST_METHOD} ^GET$ -RewriteRule ^people$ index.php +RewriteRule ^people$ controllers/people.php?action=index RewriteCond %{REQUEST_METHOD} ^DELETE$ RewriteRule ^people/([0-9]+)$ delete.php?id=$1 RewriteCond %{REQUEST_METHOD} ^POST$ diff --git a/controllers/people.php b/controllers/people.php new file mode 100644 index 0000000..45e04cd --- /dev/null +++ b/controllers/people.php @@ -0,0 +1,8 @@ + diff --git a/controllers/person.php b/controllers/person.php deleted file mode 100644 index e69de29..0000000 diff --git a/data/people.php b/data/people.php index f36d34c..9fd48bb 100644 --- a/data/people.php +++ b/data/people.php @@ -1,5 +1,5 @@