V
V
vladstudio2011-10-09 19:35:42
Nginx
vladstudio, 2011-10-09 19:35:42

Nginx language redirect: /de/test/test.php to /test/test.php?

Hello,

I'm struggling with nginx setup. There is a script - for example, at "/test/test.php". It is necessary that when requesting "/de/test/test.php" nginx -

- sets the cookie (lang=de)
- returns "/test/test.php" (but without changing the URL so that the visitor remains on "/de/test /test.php"

I would really appreciate any help! It's been so long that I'm thinking of canceling the new server and going back with the old shared apache hosting :-(

Thanks!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2011-10-09
@BuriK666

rewrite ^/(en|de|ru|etc)/test/test.php /test/test.php?lang=$1
something like this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question