Jump to content

Featured Replies

Posted

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 .htaccess
But 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.

image.png

  • 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

  • Author

.htaccess (main)

<IfModule mod_rewrite.c>

Options -MultiViews

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule \.(js|css|jpeg|jpg|gif|png|ico|map)(\?|$) /404error.php [L,NC]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>

  • Community Expert

You would therefore need to check this with your hosting company

  • 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>
  • 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.

Recently Browsing 0

  • No registered users viewing this page.