Title: Extended redirection URL
Last modified: July 21, 2023

---

# Extended redirection URL

 *  Resolved [mattspit](https://wordpress.org/support/users/mattspit/)
 * (@mattspit)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/extended-redirection-url/)
 * Hi,
 * I need some assistance if possible please.
 * Does pretty links plugin has a similar hook that I can use similar to the below
   please?
 * function extended_filter_redirect_url($redirect_url, $name, $query_string = ”){
   
   $redirect_url = preg_replace(‘/&\!/’, ”, $redirect_url);        return $redirect_url;}

Viewing 1 replies (of 1 total)

 *  [Tyler](https://wordpress.org/support/users/tylerthedude/)
 * (@tylerthedude)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/extended-redirection-url/#post-16913176)
 * Hi [@mattspit](https://wordpress.org/support/users/mattspit/),
 * Thank you for reaching out. We offer a “prli_target_url” filter hook which allows
   you to work with the URL before the user gets redirected. I’ll provide an example
   of how you could use that filter below:
 *     ```wp-block-code
       add_filter('prli_target_url', function($redirect_args) {
       	$redirect_args['url'] = preg_replace('/&\!/', '', $redirect_args['url']);
       	return $redirect_args;
       });
       ```
   
 * I hope this helps!
 * Kind regards,

Viewing 1 replies (of 1 total)

The topic ‘Extended redirection URL’ is closed to new replies.

 * ![](https://ps.w.org/pretty-link/assets/icon-256x256.png?rev=2503434)
 * [PrettyLinks - Affiliate Links, Link Branding, Link Tracking, Marketing and Stripe Payments Plugin](https://wordpress.org/plugins/pretty-link/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pretty-link/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pretty-link/)
 * [Active Topics](https://wordpress.org/support/plugin/pretty-link/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pretty-link/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pretty-link/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tyler](https://wordpress.org/support/users/tylerthedude/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/extended-redirection-url/#post-16913176)
 * Status: resolved