I know that hosts file will bypass the DNS and redirect the domain elsewhere. But I only want to redirect some (not all) URLs from the same domain. That would test what the website would behave like if certain files were changed without actually changing them live. For example, I would not want the html file redirected, but I would want one or two of .css or .js files redirected.
Yes, I know I could use a local webserver with a complete copy of the site, but that is not practical. So I'd like a redirection solution, can be browser specific. If it is browser specific, I would prefer Firefox, or else Chrome or Edge.