这个 HTTP Authorization RewriteRule 有什么作用? [英] What does this this HTTP Authorization RewriteRule do?

查看:22
本文介绍了这个 HTTP Authorization RewriteRule 有什么作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站上某处发生了由 Google Bot 引起的重写递归错误,但由于我的 Loglevel 较低,我找不到导致该错误的 url.我提出过,但到目前为止还没有发生过.

I have an rewrite recursion error somewhere on my website that Google Bot caused, but I can't find the url that caused it because my Loglevel is low. I raised it but it has not happened again so far.

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

我觉得所有的 Rewriterule 都很好,并且都有 [L] 标志,除了这个.

All Rewriterules look fine to me and have the [L] flag, except this one.

我不太明白.它来自开源商店系统 Magento.

I can't quite understand it. It is from the open source shop system Magento.

据我所知,它除了设置环境变量 E 什么都不做.但这不是一种非常愚蠢的做法吗?如果这是目标,您不应该使用 SetEnv 吗?

As far as I can tell it does nothing but sets the environment variable E. But isn't that a very stupid way of doing that? Shouldn't you use SetEnv if that was the goal?

推荐答案

这一行是将环境变量设置为用户身份验证字符串的值——本质上是设置一个变量而不是常量值.据我所知,SetEnv 和 SetEnvIf 只允许您将环境变量设置为预定的常量.

This line is setting the environment variable to the value of user authentication string - essentially setting a variable rather than constant value. As far as I know, SetEnv and SetEnvIf only allow you to set an environment variable to a predetermined constant.

设置的变量实际上是 HTTP_AUTHORIZATION,而不是 E.我猜这是用户身份验证过程的一部分.

The variable being set is actually HTTP_AUTHORIZATION, not E. I would guess this is part of the user authentication process.

这篇关于这个 HTTP Authorization RewriteRule 有什么作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆