Ah, yes! The classic ERR_TOO_MANY_REDIRECTS error. This is a very common issue when setting up this type of redirect, and the good news is that it's very easy to fix.
Why It's Happening (The Redirect Loop)
The error is happening because your redirect rule is creating an infinite loop. Here's the sequence of events:
- A user visits
/boy/shirts/.
- Your rule
^/boy/.* correctly matches this URL.
- The Redirection plugin sends the user to the destination:
/boy/.
- The browser now requests
/boy/.
- Here's the problem: The rule
^/boy/.* also matches /boy/! The * in .* means "zero or more characters". So, /boy/ followed by zero characters is a valid match.
- The plugin sees the match and tries to redirect
/boy/... to /boy/.
- The browser is now in a loop, constantly being told to go to the same page it's already on. After a few tries, it gives up and displays the
ERR_TOO_MANY_REDIRECTS error.
The Solution: Make the Regex More Specific
You need to adjust the regular expression to match URLs that have /boy/ plus at least one more character. This will exclude the parent URL /boy/ from the redirect rule, breaking the loop.
The change is very simple: replace the asterisk (*) with a plus sign (+).
.* means "match any character, zero or more times".
.+ means "match any character, one or more times".
This is the exact change you need.
How to Fix It in Redirection
-
Go to your Redirection rules: In your WordPress dashboard, navigate to Tools > Redirection.
-
Find the problematic rule: Find the rule you created with the Source URL ^/boy/.*. You can use the search box at the top to filter for "boy".
-
Edit the rule: Hover over the rule and click "Edit".
-
Update the Source URL:
- Change the Source URL from
^/boy/.* to ^/boy/.+
-
Confirm the other settings:
- Destination URL: should still be
/boy/
- Regex: The checkbox must remain checked.
- Match: "URL Only" is usually correct.
- Group: Your default "Redirections" group is fine.
-
Save Changes: Click the "Save" button.
Crucial Final Step: Clear Your Caches!
Your browser has "remembered" the bad redirect. Even after you fix the rule, the browser might keep using its cached memory of the redirect loop.
- Clear Your Browser Cache: This is the most important step. In Chrome, you can press
Ctrl + Shift + R (or Cmd + Shift + R on Mac) for a hard refresh that bypasses the cache. For a full clear, go into your browser's history settings and clear the cache.
- Clear Your Website Cache: If you use a caching plugin (like WP Rocket, W3 Total Cache, etc.) or your web host has server-side caching, you must clear that cache as well.
- Test in an Incognito/Private Window: The easiest way to test is to open a new private browsing window. This will ignore any stored caches or cookies and give you a clean test.
To test:
- Go to
/boy/some-other-page/ -> It should correctly redirect to /boy/.
- Go directly to
/boy/ -> It should now load correctly without any redirect error.
That's it! That simple change from * to + is all you need to fix the redirect loop.