V
V
Vladimir2019-12-12 11:43:23
Nginx
Vladimir, 2019-12-12 11:43:23

How to properly process a request in nginx?

Good afternoon, connoisseurs!
I know how it is done in Apache, I rummaged through everything in nginx ...
it is necessary that when accessing the site example.com/3t5fxs , in fact, nginx considers that this is example.com/index.php?id=3t5fxs
At the same time, the user would not have a url changed

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir, 2019-12-12
@qDiablo

For those who are interested, I solved it like this:

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

And then in php: A crutch, but it works as it should)

M
MechanicZelenyy, 2019-12-14
@MechanicZelenyy

Ask in the tag "Sberbank" or "Rambler", they know.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question