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

已提問 2 年前檢視次數 362 次
2 個答案
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
已回答 2 年前
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
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南