diff --git a/htdocs/.htaccess b/htdocs/.htaccess index 734403d..bc5ebc7 100644 --- a/htdocs/.htaccess +++ b/htdocs/.htaccess @@ -9,4 +9,4 @@ RewriteEngine On ## For API RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule (API|api)/v2/(.*)$ API/v2/index.php/$1 [L] +RewriteRule (API|api)/v2/(.*)$ api/v2/index.php/$1 [L] diff --git a/htdocs/API/v2/html/404.html b/htdocs/api/v2/html/404.html similarity index 100% rename from htdocs/API/v2/html/404.html rename to htdocs/api/v2/html/404.html diff --git a/htdocs/API/v2/html/index.html b/htdocs/api/v2/html/index.html similarity index 100% rename from htdocs/API/v2/html/index.html rename to htdocs/api/v2/html/index.html diff --git a/htdocs/API/v2/index.php b/htdocs/api/v2/index.php similarity index 92% rename from htdocs/API/v2/index.php rename to htdocs/api/v2/index.php index 5216b16..9219fbb 100644 --- a/htdocs/API/v2/index.php +++ b/htdocs/api/v2/index.php @@ -71,7 +71,7 @@ $app->error(function (\Exception $e) use ($app) { // 測試用 Say hello!~~~ -$app->get('/Hello/:name', function ($name) use ($app) { +$app->get('/hello/:name', function ($name) use ($app) { $app->view(new \JsonApiView()); $app->add(new \JsonApiMiddleware()); @@ -83,7 +83,7 @@ $app->get('/Hello/:name', function ($name) use ($app) { // ============================================================================ -$app->group('/Users', 'APIrequest', function () use ($app) { +$app->group('/users', 'APIrequest', function () use ($app) { // 建立帳號 $app->post('/', function () use ($app) { @@ -114,13 +114,13 @@ $app->group('/Users', 'APIrequest', function () use ($app) { }); - $app->post('/:user_id/Login/', function ($user_id) use ($app) { + $app->post('/:user_id/login/', function ($user_id) use ($app) { // TODO: 登入 APIdisableFunc($app); }); }); -$app->group('/UTokens', 'APIrequest', function () use ($app) { +$app->group('/tokens', 'APIrequest', function () use ($app) { $app->get('/:token', function ($token) { //echo "Login Token: $token";