Urgent.News

One page, thousands of outlets. See who else covered it.

Editions

Tech

Your redirect rule says Active and nothing happens

The rule is in the list. Its toggle says Active. You open the URL and the old page loads, exactly as before. Nothing in the dashboard suggests a problem, because nothing in the dashboard is wrong: Active means the rule was saved and is eligible to run. It says nothing about whether a request ever reached it. That gap is the whole diagnosis. Four questions close it, in this order, and each one is…

The redirect rule in question is in an active state, as indicated by the toggle on the dashboard. However, when the URL is opened, the old page loads instead of the redirect being applied. The dashboard does not provide any indication of a problem, as the rule is saved and eligible to run. The core issue is that there is no way to determine if a request actually reaches the redirect rule.

To diagnose this problem, four questions need to be answered in order. The first question is whether the request reaches the zone at all. This can be checked by creating a temporary redirect rule on a path that doesn't serve anything on the site and pointing it to a location. Using a tool like curl, the response can be checked. A 302 response indicates that the request reached the zone and the rules ran, while a 404 or any other response from the origin means the request did not reach the zone.

If the probe stays negative, there are three possible scenarios where the rule might not apply to the traffic. The rule may not have proxied the DNS records of the domain through Cloudflare, the nameservers may not have been switched, or the host may be on Cloudflare through a SaaS arrangement called Orange-to-Orange. In the latter case, the rule may not run due to specific conditions not being met.

Question two involves determining whether the rule matches the actual request. A wildcard pattern is compared against the entire URL, including the query string. If the pattern does not end with an asterisk (*), it will never match a request with a query string. This can lead to confusion when testing the rule by adding a cache-buster to defeat the browser cache, as it may appear that the rule is broken when in fact the cache-buster is interfering.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

The Gate That Expires After One Message

The Gate That Expires After One Message Something goes wrong at 2am. You pull the logs. The agent had authorization, of course it did. You gave it authorization six hours ago when the session started.

More from Tuesday 18 August →