Answer the question
In order to leave comments, you need to log in
How to write nginx config?
Hello, I am implementing an API on a website.
the API method call will be something like this: /api/user.getFoo?arg=1234
The fact is that I want to send a request to the api/index.php page at a similar URL: api/api_method?arg=data where I will already parse the requested URL and call - return the necessary data ..
did it on htaccess quickly:
RewriteRule ^api/((?!index\.php$).+)$ /api/index.php [L,NC]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question