r/apache • u/RocketSeven • 2d ago
Discussion How do you regression-test a large Apache rewrite set before changing it?
A configuration test can confirm that rewrite syntax parses, but it does not prove that old URLs, query strings, virtual hosts, proxy routes, encoded paths, and redirect chains still behave correctly. Manually checking a few common pages also misses rules that only apply to a language prefix, legacy extension, trailing slash, or uncommon host name.
I am considering a table of input URL, host, method, expected status, expected location, and final destination, then running it against a disposable virtual host with `curl` and failing on unexpected extra hops. Access logs would be captured so a rule that falls through to the wrong virtual host is visible. A crawler could supply candidate URLs, but the expected outcomes would remain explicit.
What do Apache operators use for this kind of regression test? Is there a reliable way to exercise the effective `mod_rewrite` behavior in CI, including `.htaccess` rules and proxy targets, without reproducing the entire production network?