3

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 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Sorry, maybe I didn't make myself sufficiently clear. I updated the question... I want them to be able to go to a specific part of the page through the address bar. Either way, thanks even if only for the link, that's valuable!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.