Answer the question
In order to leave comments, you need to log in
How to write an nginx redirect?
It is necessary for nginx to form the correct redirect from the index.php pages and possible get parameters to the page / and get parameters. So far there is the following:
map $request_uri $index {
default "0";
"~/bitrix/admin/" "0";
"~/auth/" "0";
"~^(.*)index\.(?:php|html)" "$1";
}
if ($index != 0) {
return 301 $index;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question