如何将 url/abc 重定向到 url/abc/live-preview,其中 abc 是变量名?
How do i redirect a url/abc to url/abc/live-preview where abc is a variable name?
我有一个 url - https://sambit.com/hub/abc which i want to redirect to https://sambit.com/admin/sites/editors/hub-page/abc/live-preview,其中 abc 是一个变量值。
我写了一个这样的 nginx 配置 -
location /hub { rewrite ^/hub(.*)$ https://iwillonlytestit.replica.bangthetable.in/admin/sites/editors/hub-page//live-preview permanent; }
但它似乎没有重定向到我想要的 url。
它重定向到 https://sambit.com/admin/sites/editors/hub-page/.*/live-preview。
有人可以帮我吗?
我找到了一种方法来完成如下任务 -
rewrite ^(/hub)(.*)$ https://iwillonlytestit.replica.bangthetable.in/admin/sites/editors/hub-page/live-preview permanent;
此重定向自 https://iwillonlytestit.replica.bangthetable.in/hub/abc to https://iwillonlytestit.replica.bangthetable.in/admin/sites/editors/hub-page/abc/live-preview
我有一个 url - https://sambit.com/hub/abc which i want to redirect to https://sambit.com/admin/sites/editors/hub-page/abc/live-preview,其中 abc 是一个变量值。
我写了一个这样的 nginx 配置 -
location /hub { rewrite ^/hub(.*)$ https://iwillonlytestit.replica.bangthetable.in/admin/sites/editors/hub-page//live-preview permanent; }
但它似乎没有重定向到我想要的 url。
它重定向到 https://sambit.com/admin/sites/editors/hub-page/.*/live-preview。
有人可以帮我吗?
我找到了一种方法来完成如下任务 -
rewrite ^(/hub)(.*)$ https://iwillonlytestit.replica.bangthetable.in/admin/sites/editors/hub-page/live-preview permanent;
此重定向自 https://iwillonlytestit.replica.bangthetable.in/hub/abc to https://iwillonlytestit.replica.bangthetable.in/admin/sites/editors/hub-page/abc/live-preview