How to make Nginx redirect virus?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
11 views
How to make Nginx redirect with site.com/%40user on site.com/@user

Write the following condition rewrite ^/%40(.*)$ /@$1 permanent;but no redirect. I think it's because of the sign %, it is necessary as-that to escape, because when I remove it and leave just 40 rewrite ^/40(.*)$ /@$1 permanent;, redirect works for site.com/40user

Tried to search for how to escape the %, but anything sensible there. Maybe not in that side dig?
by | 11 views

2 Answers

0 like 0 dislike
location and rewrite to match the request URI used in a normalized manner, i.e., after decoding the text specified in the form %XX.
In its original form, the query can be found in the $request_uri. There it is in full (with the arguments).

if ($request_uri ~ "^/%40(.*)$") { return 301 /@$1; }
by
0 like 0 dislike
Dig in the direction of Urlencode, IMHO.
by

Related questions

0 like 0 dislike
2 answers
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked Apr 9, 2019 by NeTLeaDeR
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
35,390 users