1、abc.com/goods/123
2. abc.com/#/goods/123
Seeking nginx rewrite writing method
Rewrite the first url to the second url.
Added:
First of all, thank you for your answer. There may be some problems with what I described here. abc.com/goods/123 The goods here may be any address,
1. abc.com/xxx/.../...
2. abc.com/#/xxx/.../...
And when rewriting, it is also necessary to determine whether the url is
in 1.
If the url is already of type 2, there is no need to rewrite
The logic should be
Determine whether there is ‘#’
in $request_uri or $uri
If there is no ‘#’, rewrite will add ‘#’ to
The question here is whether ‘#’ can be obtained through variables such as $request_uri for judgment
No attempts have been successful so far. . .