$_GET 变量不工作我的 ec2 实例使用 cloudfront aws

$_GET variables don't work my ec2 instance using cloudfront aws

在我的网站上,php 的 $_GET 变量不起作用(未定义的索引错误)。对于我的行为设置,我有这个设置:

我还需要设置其他选项吗?

CloudFront 设置与您没有 $_GET 完全无关,除非它与末尾附加的查询字符串相关。

如果是这种情况,那么您需要查看转发重要密钥或所有密钥(尽管这会影响缓存性能)。

You can configure CloudFront do one of the following:

  • Don't forward query strings to the origin at all. If you don't forward query strings, CloudFront doesn't cache based on query string parameters.

  • Forward query strings to the origin, and cache based on all parameters in the query string.

  • Forward query strings to the origin, and cache based on specified parameters in the query string.

在这里进一步阅读:https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/QueryStringParameters.html