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.

  • If you had an install of nginx, you could set it to reverse proxy the site, then return your override files from it and pass through the rest. If it's an https site, things get much more complicated though, since you need to have your own local CA to fake a cert. – Andrew Domaszek Feb 2 '18 at 14:56
  • @AndrewDomaszek It's just http. I'll look into nginx then, thanks. – Heimdall Feb 2 '18 at 17:36

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.