From fdd29a9a839601664459031937ed2b371ece5c93 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Thu, 21 Sep 2017 16:46:54 -0400 Subject: [PATCH] routes for companies --- .htaccess | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.htaccess b/.htaccess index 4285ffe..d97c997 100644 --- a/.htaccess +++ b/.htaccess @@ -1,4 +1,6 @@ RewriteEngine On + +# people routes RewriteCond %{REQUEST_METHOD} ^GET$ RewriteRule ^people$ controllers/people.php?action=index RewriteCond %{REQUEST_METHOD} ^POST$ @@ -7,3 +9,13 @@ RewriteCond %{REQUEST_METHOD} ^DELETE$ RewriteRule ^people/([0-9]+)$ controllers/people.php?action=delete&id=$1 RewriteCond %{REQUEST_METHOD} ^PUT$ RewriteRule ^people/([0-9]+)$ controllers/people.php?action=update&id=$1 + +# companies routes +RewriteCond %{REQUEST_METHOD} ^GET$ +RewriteRule ^companies$ controllers/companies.php?action=index +RewriteCond %{REQUEST_METHOD} ^POST$ +RewriteRule ^companies$ controllers/companies.php?action=post +RewriteCond %{REQUEST_METHOD} ^DELETE$ +RewriteRule ^companies/([0-9]+)$ controllers/companies.php?action=delete&id=$1 +RewriteCond %{REQUEST_METHOD} ^PUT$ +RewriteRule ^companies/([0-9]+)$ controllers/companies.php?action=update&id=$1