A
A
Artem00712017-02-03 14:06:22
Angular
Artem0071, 2017-02-03 14:06:22

How to redirect to base index file?

Good afternoon!
I made a site on localhost, and if I wrote localhost/qwerty, then everything worked as it should
Transfer the site to the domain, now if you turn to domen.ru/ everything works OK
But if you go to domen.ru/qwerty right away, then the hoster writes what is wrong there is no file.
And if you go to domen.ru/ and then follow the internal link to /qwerty, then everything is also fine.
What needs to be done to transfer as needed?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Kostya Gorozhanov, 2017-02-03
@Artem0071

In HTML, specify the <base href="/">
server to configure so that it gives your index.html
everything for any request (well, except for static and api)

A
Andrey Zubkov, 2017-02-03
@zubkov_work

Ask in those support what would be written in the nginx config
location / {
try_files $uri $uri/ /index.html?$args;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question