AWS Amplify Status 301

0

I got the status 301 in application. So I need to remove permanent redirecting in Amplify route because end of my URL automatically add one / and showing error

Eg Url : https://test.amplifyapp.com/file**/**

Eg Error: ** <Error> <Code>AccessDenied</Code> <Message>Access Denied</Message> <RequestId>NR3C1PN5GWQZMG5B</RequestId> <HostId>yugKPfgL6YPKX8MR87oaYOEkhrUWSh7uLDqWcILxv3WPGteciQOd4cP+yoVH7UV6cYNv3wbmc9U=</HostId> </Error>**

asked 2 years ago253 views
2 Answers
0

Hello,

I understand that you are getting an "AccessDenied" error when trying to access your URL and you want to remove permanent redirect in Amplify.

Redirects enable a web server to reroute navigation from one URL to another. In AWS Amplify redirects and writes have special configurations. Check the Rewrites and redirects settings in the left navigation pane:

AWS Amplify Console > App Settings > Rewrites and Redirects

From there, you can edit your Rewrites and redirects by adding a new rule depending on your use case. Refer [1] for more information on redirect and write in AWS Amplify.

References:

  1. https://docs.aws.amazon.com/amplify/latest/userguide/redirects.html#redirects-for-single-page-web-apps-spa

I hope this will help.

--Cebi

Cebi
answered 2 years ago
0

If you're using the AWS Amplify Console to manage your app, you can adjust the routing settings in the console.

  • Log in to the AWS Amplify Console.
  • Select your app.
  • Go to "App settings" or a similar section where you can manage routing.
  • Look for settings related to URL redirects or routing rules.
  • If there's a rule causing the 301 redirection, modify it to prevent the extra "/" at the end of URLs.
AWS
answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions