Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted March 10Mar 10 Hi, I'm facing this issue even if I follow instructions from the image attached bellow. I correctly downloaded the file, uploaded it in /api and it's named .htaccessBut I still can not pass to management page of the REST API. Visiting the /api page return { "errorCode": "2S290\/6", "errorMessage": "NO_API_KEY" }Regards.
March 10Mar 10 Community Expert You would not be able to just visit /api without providing a key. If you are not getting past that page, you need to check why rewriting isnt working there. First of all I would check your main htaccess to see if there is anything additional there, as there are multiple redirects causing issues on your site in other places too
March 10Mar 10 Author .htaccess (main)<IfModule mod_rewrite.c>Options -MultiViewsRewriteEngine OnRewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteRule \.(js|css|jpeg|jpg|gif|png|ico|map)(\?|$) /404error.php [L,NC]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]</IfModule>
March 10Mar 10 Community Expert That .htacess file you posted is the default one for Friendly URLs (FURLs) that goes in the root directory (where conf_global.php is).The one to enable the APIs goes inside the /api folder and is completely different. It should be something like this:<IfModule mod_setenvif.c> SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0 </IfModule> <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteBase /api/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] </IfModule>
March 10Mar 10 Author Yes. That why I did not post it since it was not edited as well in the api folder.Problem solved, request was blocked by cloudflare.