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>**

preguntada hace 2 años361 visualizaciones
2 Respuestas
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
respondido hace 2 años
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
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas