From d672fcd2644604430dee09dc246ee7e57e3d1ee7 Mon Sep 17 00:00:00 2001 From: Juan Date: Mon, 24 Jan 2022 13:39:46 +0100 Subject: [PATCH] adding sample htaccess and gitignore update to allow it --- .gitignore | 4 ++-- b3-dev/api/api-php/.htaccess | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 b3-dev/api/api-php/.htaccess diff --git a/.gitignore b/.gitignore index bb90384..decb67a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -.htpasswd* -.htaccess* +/.htpasswd* +/.htaccess* .DS_Store *.lnk **/node_modules/* diff --git a/b3-dev/api/api-php/.htaccess b/b3-dev/api/api-php/.htaccess new file mode 100644 index 0000000..cf6a521 --- /dev/null +++ b/b3-dev/api/api-php/.htaccess @@ -0,0 +1,16 @@ + +# si le module mod-rewrite est activé + + # init du moteur + RewriteEngine On + # url de départ de l'api + RewriteBase / + # si ce n'est pas index.php + RewriteRule ^index\.php$ - [L] + # si le fichier existe pas + RewriteCond %{REQUEST_FILENAME} !-f + # si le dossier existe pas + RewriteCond %{REQUEST_FILENAME} !-d + # je renvoie vers l'index de lapi + RewriteRule . /api/index.php [L] + \ No newline at end of file