Get 403 error from API connection –> could be rewrite rules?

Im on Ubuntu 22.04 on vultr.
Current Version:

Current Commit:
Latest Version:
Latest Build:
Latest Commit:

I keep getting error 403 on some api calls. I have tried to get to the reason but still can’t find it. I check with an application the api call log and it tells me that it is code 200 that on the server side that made the call receives a 403. I read that it may be a misconfiguration of the htaccess file that may be generating the error…can it be? I migrated this site from another server to my current setup with cyberpanel and lightspeed, so maybe the htaccess file is dragging some configuration that generates the conflict.

This is the htaccess detail

Rewrite Rules Added by CyberPanel Rewrite Rule Generator

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

End CyberPanel Generated Rules.


LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block!

RewriteEngine on CacheLookup on RewriteRule .* - [E=Cache-Control:no-autoflush] RewriteRule \.litespeed_conf\.dat - [F,L]

marker MOBILE start

RewriteCond %{HTTP_USER_AGENT} Mobile|Android|Silk/|Kindle|BlackBerry|Opera\ Mini|Opera\ Mobi [NC]
RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+ismobile]

marker MOBILE end

marker CACHE RESOURCE start

RewriteRule wp-content/./[^/](responsive|css|js|dynamic|loader|fonts).php - [E=cache-control:max-age=3600]


marker FAVICON start

RewriteRule favicon.ico$ - [E=cache-control:max-age=86400]

marker FAVICON end

marker CORS start

<FilesMatch “.(ttf|ttc|otf|eot|woff|woff2|font.css)$”>

Header set Access-Control-Allow-Origin “*”

marker CORS end

marker WEBP start

RewriteCond %{HTTP_ACCEPT} “image/webp”
RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
RewriteCond %{HTTP_USER_AGENT} iPhone.*Version/(\d{2}).Safari
RewriteCond %1 >13
RewriteRule .
- [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]

marker WEBP end

marker DROPQS start

CacheKeyModify -qs:fbclid
CacheKeyModify -qs:gclid
CacheKeyModify -qs:utm*
CacheKeyModify -qs:_ga

marker DROPQS end

## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## # END LSCACHE # BEGIN NON_LSCACHE ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## ### marker BROWSER CACHE start ### ExpiresActive on ExpiresByType application/pdf A31557600 ExpiresByType image/x-icon A31557600 ExpiresByType image/ A31557600 ExpiresByType image/svg+xml A31557600

ExpiresByType image/jpg A31557600
ExpiresByType image/jpeg A31557600
ExpiresByType image/png A31557600
ExpiresByType image/gif A31557600
ExpiresByType image/webp A31557600

ExpiresByType video/ogg A31557600
ExpiresByType audio/ogg A31557600
ExpiresByType video/mp4 A31557600
ExpiresByType video/webm A31557600

ExpiresByType text/css A31557600
ExpiresByType text/javascript A31557600
ExpiresByType application/javascript A31557600
ExpiresByType application/x-javascript A31557600

ExpiresByType application/x-font-ttf A31557600
ExpiresByType application/x-font-woff A31557600
ExpiresByType application/font-woff A31557600
ExpiresByType application/font-woff2 A31557600
ExpiresByType application/ A31557600
ExpiresByType font/ttf A31557600
ExpiresByType font/otf A31557600
ExpiresByType font/woff A31557600
ExpiresByType font/woff2 A31557600

### marker BROWSER CACHE end ###

LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block!


BEGIN WordPress

Las directivas (líneas) entre “BEGIN WordPress” y “END WordPress” son

generados dinmicamente, y sólo deben ser modificados a través de los filtros de WordPress.

Cualquier cambio en las directivas entre estos marcadores se sobrescribirá.

RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

END WordPress

look fine?
best regards,