Answer the question
In order to leave comments, you need to log in
How to redirect to another directory?
There is such a link https://domain.ru/bx/ , which redirects to the required directory /application/dist/ , index.html opens in it , but all connected scripts in this file try to access https://domain.ru / , but you need to go to https://domain.ru/bx/ . Adding https://domain.ru/bx/ to src is not an option.
What are the configuration options in NGINX to send a request to https://domain.ru/bx/ ?
location ^~ /application/ {
return 403;
internal;
location ~ ^/application/dist/ {
index index.html index.hml;
}
}
location /bx/ {
rewrite ^/bx/$ /application/dist/ last;
}
Answer the question
In order to leave comments, you need to log in
nginx will not help you much here: review the connection of scripts on the page.
IF the scripts are included in a relative path and start with a slash (/src.js), then such paths will be searched from the site root, not your directory.
Of course, you can try to use the base tag, but it is unlikely to help here.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question