2
votes

I have a Vue app that uses Vue router. Now I'm supposed to make a website for a client where one part is "secret" and can only be accessed through a direct link.

In other words, I want users to be able to navigate to myamplifyapp.com/mysecretpage just by entering this in the address bar.

I heard this works with Vue router history mode, set it up locally (apache) and everything is working well, but when I'm deploying it on Amplify, I can't access this page directly through a link, instead it just goes to index.html. Is there any way I can configure Amplify to make this work?

1

1 Answers

1
votes

You can add a redirect to point users to index.html.

Something like this should work:

/<*> /index.html 200.

You'll probably want js/css files to not be redirected. For that you can try the reg exp from the link.