You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the release of 2.4.0 and after, REDIRECT_ is now sometimes prepended to server variables, at least in PHP's $_SERVER global, which means that claim variables don't always have the same name. I found some useful info in this stackoverflow thread about the REDIRECT_ phenomenon, but it still is incredibly confusing and hard to reason about.
Relevant section in 2.4.0 release notes:
those who use claim environment variables will find that the names of these variables are now prefixed with REDIRECT_
While this behavior is unwanted and seems insane to me, it doesn't look like there is any way to disable it.
So, I have two questions for anyone who has dealt with this:
Can the prepending of REDIRECT_ be recursive? So, for example, if I go to a page with multiple redirects caused by rewrite rules in multiple .htaccess files, is it possible that variable names end up like this: REDIRECT_REDIRECT_...?
What's the best way around this? I'm leaning towards creating a dedicated function in PHP to handle accessing claim variables
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
With the release of 2.4.0 and after,
REDIRECT_
is now sometimes prepended to server variables, at least in PHP's$_SERVER
global, which means that claim variables don't always have the same name. I found some useful info in this stackoverflow thread about theREDIRECT_
phenomenon, but it still is incredibly confusing and hard to reason about.Relevant section in 2.4.0 release notes:
While this behavior is unwanted and seems insane to me, it doesn't look like there is any way to disable it.
So, I have two questions for anyone who has dealt with this:
REDIRECT_
be recursive? So, for example, if I go to a page with multiple redirects caused by rewrite rules in multiple.htaccess
files, is it possible that variable names end up like this:REDIRECT_REDIRECT_
...?Any help is greatly appreciated
Beta Was this translation helpful? Give feedback.
All reactions