Using the Rest API Demo how can i exclude /manager/ in .htaccess

using .htaccess on the site, what modifications need to be made to exclude the manager folder so I can admin the site?

the docs weren’t 100% clear… am i putting the .htaccess in /rest/ or am i putting it in the modx root. the root seems like it makes sense since i don’t really wanna serve anything but the API but I am no .htaccess master so excluding manager would be helpful! thanks!

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^(.*)$ rest/index.php?_rest=$1 [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ rest/index.php [QSA,NC,L]

what i did was …

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^(.*)$ rest/index.php?_rest=$1 [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} -d
# RewriteRule ^(.*)$ rest/index.php [QSA,NC,L]
RewriteRule ^(?!core/)^(?!manager/)(.*)$ rest/index.php [QSA,NC,L]

it seems to be working but i am not 100% that its a good thing or if you would recommend I do something different? etc. basically the mangaer is a headless CMS, 100% i don’t want a single html page servered i just want the rest

does it look ok ?

thanks!

The /manager directory has its own .htaccess file, so I don’t think you have to make any changes to the .htaccess file in your root to exclude the manager.

ok i tried what you suggested and it works without me needing to exclude it, so i will give that a shot! thanks for your help

kinda had some random moments where it was coming back as a REST API so i put my htaccess back the way it is. maybe the change never worked but was just cached? who knows, but im good for now, thanks