Mehrad Farahnak
Mehrad Farahnak

Reputation: 1272

React router doesn't work correctly in nginx

React router works with one extra parameter in URL but when add another parameter like /panel-admin/dashboard doesn't work, i add this code

 location / {
           try_files $uri /index.html;
        }

but doesn't work

Upvotes: 0

Views: 207

Answers (1)

Adam Jeliński
Adam Jeliński

Reputation: 1788

Maybe try this?

location / {
    try_files $uri $uri/ /index.html;
}

Upvotes: 1

Related Questions