A
A
Alexander Makarov2017-01-19 00:48:09
Nginx
Alexander Makarov, 2017-01-19 00:48:09

How to make CNC on Nginx?

Gentlemen sysadmins. Your help is required.
Actually the question is how to convert at the nginx level an address of the form site.com/v2/par1/par2/par3/ into an address of the form site.com/version2.php?par1=1&par2=1&par3=1?
The number of parameters can be different, and if there is no v2 in the address, then instead of version2.php the URL leads to index.php with the above parameters.
Thanks for your help in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2017-01-19
@HeadOnFire

At the Nginx level, you only install:

location / {
    try_files $uri $uri/ /index.php?$args;
}

And all the rest of the logic is at the PHP level.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question