Reputation: 21
I use NGINX. For personal reason, I want to detect if the request comes from cURL, then redirect to my static page (eg. mydomain.com/curl).
How to do that? Where I should use that? (nginx.conf or can I do that in php script?)
Upvotes: 0
Views: 346
Reputation: 48357
You can't.
At least if the request was launched by a competent person deliberately trying to look like a browser. If they're not trying to mislead you, just look at the user-agent.
OTOH you could use JavaScript to redirect real browsers.
Upvotes: 1