# How to maintain parameters on redirect

Source: https://docs.arcxp.com/en/knowledge-articles/web-delivery/how-to-maintain-parameters-on-redirect.html

## Summary

To ensure that the parameters are still included in the destination URL, the destination URL should be given as a **relative path**. This is only supported for redirects within the same website.

## Procedure

1. For Draft API, make a POST request to create a redirect:  
`https://api.washpost.arcpublishing.com/draft/v1/redirect/washpost/sports/golf/?website=washpost`
2. Add destination to the body of the request (as a relative path):  
```json
{
    "redirect_to": "/sports/"
}
```
3. Test the path by passing a parameter, for example:  
Redirect to a relative path `https://www.washingtonpost.com/sports/golf/?outputType=amp` \> `https://www.washingtonpost.com/sports/?outputType=amp`  
Redirect to an absolute path `https://www.washingtonpost.com/sports/golf/?outputType=amp` \> `https://www.washingtonpost.com/sports/`

This applies to other types of redirects available on Arc XP, like Redirects UI and Composer Forward URL
