browse doesn’t really affect redir. The key point here is the root and how it interacts with request paths vs file paths. redir operates off the request path, not the file path - if you type example.com/foo/bar in your browser, the request path is /foo/bar. If the site root is /var/www, and the request is /foo/bar, Caddy will serve whatever is at the file path /var/www/foo/bar.
Since your site root is C:\Users\jungle\Documents\books, and you want to redirect requests for mags\TNA in that folder, your redir should be:
Hmm. redir needs to match the request path exactly, except for /, which matches everything. So even a slight deviation to /mags/TNA, or requesting something inside that directory, wouldn’t be caught.
rewrite can do catch-alls, though. You can rewrite from the catch-all to an exact path, then redirect that. This might work a little better:
rewrite /mags/TNA {
to /google
}
redir /google https://www.google.com
Since I was using browse, it was showing the file contents of /mags/TA, which are many pdfs.
Unless I specifically provided a full file name, redir wouldn’t have worked - got it!