| Project: | Global Redirect |
| Version: | 6.x-1.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I tracked down a bug in my setup that caused Redirect Loops for some pages when non-clean to clean redirection was enabled in global redirect. In this case, it happened because request_uri() was returning a non-clean url even though user was on a clean url. So in the end, http://foo.com/example kepts redirecting to http://foo.com/example.
It turns out request_uri() was not returning the clean path because $_SERVER['SCRIPT_URI'] and $_SERVER['REQUEST_URI'] were not set. This happens if you don't have "RewriteEngine On" globally or in a virtual host definition. Once that is enabled, then those server variables get populated, and for me the redirect loops stopped occurring.
I hope this helps someone else.