---
name: "TSRemapFromToUrlGet"
section: "3ts"
platform: "linux"
package: "trafficserver-dev"
version: "9.2.5+ds-0+deb12u4"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/TSRemapFromToUrlGet"
---

# TSRemapFromToUrlGet(3ts)

TSRemapFromToUrlGet API function

## NAME

TSRemapFrom/ToUrlGet - TSRemapFromToUrlGet API function

## SYNOPSIS

```
#include <ts/ts.h>
```

- ***TSReturnCode* TSRemapFromUrlGet(*TSHttpTxn* txnp, *TSMLoc* \*urlLocp)**

  - ***TSReturnCode* TSRemapToUrlGet(*TSHttpTxn* txnp, *TSMLoc* \*urlLocp)**

  ## DESCRIPTION

These functions are useful for transactions where the URL is remapped, due to matching a line in *remap.config*. *TSRemapFromUrlGet()* returns the *from* URL in the matching line in *remap.config*. *TSRemapToUrlGet()* returns the *to* URL in the matching line in *remap.config*. This info is available at or after the *TS\_HTTP\_POST\_REMAP\_HOOK* hook.  If the function returns *TS\_SUCCESS*, the location of the URL is put into the variable pointed to by *urlLocp*.  On error, the function returns *TS\_ERROR*.

## COPYRIGHT

2026, dev@trafficserver.apache.org
