M
M
ML2017-02-01 19:09:35
PHP
ML, 2017-02-01 19:09:35

What is the best way to rewrite the application to another PL?

There is a lot of PHP code and now we need to rewrite it in Go.
A little about the application itself:
Apache - backend, Nginx - frontend.
All requests go to index.php through the rules in .htaccess.
Everything except existing files in directories.
Next, the function parses the url and substitutes the required php file.
Forms are sent asynchronously and data is sent to example.com/ajax.php
Actually the question is due to the fact that there is a lot of code and it will be impossible to immediately rewrite it on GO.
So my choice is:
Submitting Forms: Submit
data to example.com/ new /ajax.php
where new handles Go.
Next, the return of the pages themselves:
For example, there are addresses example.com/profile and example.com/page - written in PHP.
And for example, rewrite everything according to the file, that is, tell nginx to process /profile - php,
and let /page take care of GO.
And so slowly rewrite on the page.
How can you tell nginx, do not process this page - "/page" php interpreter, but let the server on GO do it - "example.com:60" and all addresses like example.com/new/(.*) process, also GO ?
I would appreciate your suggestion.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rustler2000, 2017-02-03
@staffID

https://www.nginx.com/resources/admin-guide/revers...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question