The current RewriteRule failed on /apis (must return index.php?url=apis)
RewriteRule ^api\/?([^\/]*)$ index.php?api&url=$1 [QSA,L]
RewriteRule ^([^.]*)$ index.php?url=$1 [QSA,L]
Valid:
- /api return index.php?api&url=
[empty] - /api/user return index.php?api&url=user
Failed:
- /apis return index.php?api&url=s, but instead must return index.php?url=apis
Update: any character after /api if does not starts with slash / must return index.php?url=[any character] – /apirf8ty76 must return index.php?url=apirf8ty76
/api still must return index.php?api&url=[empty] and /api/user return index.php?api&url=user
Change your conditions to this to make it working: