php script for dynamic redirect

277 Views Asked by At

I've been searching for a php script which does dynamic url redirect, but could not find any. Does anyone know a good one? I want to track outgoing clicks and to transform outgoing urls into this: website/go/feedtitleID

See image: https://i.stack.imgur.com/MpZ1g.jpg

Thanks

1

There are 1 best solutions below

1
Davinder Kumar On

You can use header function for dynamic redirection. For example,

header("Location: example.com");
exit();

Always use exit() or die() after header function to prevent execute below script.