TSREMAPFROM/TOURLGET(3ts)

πŸ“¦
version 9.2.5 Β· 4 versions
, in ubuntu noble, ubuntu questing

πŸ’– NAME πŸ’–

TSRemapFrom/ToUrlGet β€” the TSRemapFromToUrlGet API function, bestie. yes that's the whole name, we're being thorough here πŸ’…


✨ SYNOPSIS ✨

okay so this is the part where you just... copy it exactly, no cap:

#include <ts/ts.h>

TSReturnCode TSRemapFromUrlGet(TSHttpTxn txnp, TSMLoc *urlLocp)

TSReturnCode TSRemapToUrlGet(TSHttpTxn txnp, TSMLoc *urlLocp)

like that's it, that's the whole vibe check πŸ¦‹


🌸 DESCRIPTION 🌸

so these two functions are your besties for transactions where the URL got remapped, and the reason it got remapped is that it matched a line in remap.config. it's giving "I know a guy who knows where your URL went" 😭

  • TSRemapFromUrlGet() β€” hands you the from URL from the matching line in remap.config. the origin story, the before pic, the "who you were" πŸ“Έ
  • TSRemapToUrlGet() β€” hands you the to URL from the matching line in remap.config. the glow-up, the after pic, the "who you became" ✨
lowkey important: this info is only available at or after the TS_HTTP_POST_REMAP_HOOK hook. before that? it's not there. don't come for it early, it's not ready yet πŸ™ˆ

and here's how the return value works, stay with me:

  • if the function returns TS_SUCCESS, then the location of the URL gets dropped into the variable that urlLocp points to. that's your prize πŸŽ€
  • on error, the function returns TS_ERROR. tragic. we've all been there πŸ’€

periodt. that's the whole function. iconic behaviour honestly πŸ‘‘


copyright 2026, dev@trafficserver.apache.org. they made it, they own it, we respect it 🫢


and that's a wrap, babes! this whole thing is from Apache Traffic Server, version 9.2, dated Feb 12, 2026 β€” so go forth, grab your URLs, and slay πŸ’–πŸŒΈβœ¨πŸ¦‹πŸŽ€πŸ’…

πŸ“¦ where this page comes from