Title: New redirection method
Last modified: May 5, 2017

---

# New redirection method

 *  [Rafael Oliveros (Kazzabe)](https://wordpress.org/support/users/kazzabe/)
 * (@kazzabe)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/new-redirection-method/)
 * I’m wondering how to redirect CF7 after submit, but not using on_sent_ok as it
   will be deprecated this year.
 * I’ve read something at official page but I would like to achieve something using
   PHP.
 * Any idea?
 * `<script>
    document.addEventListener( ‘wpcf7mailsent’, function( event ) { location
   = ‘[http://example.com/&#8217](http://example.com/&#8217);; }, false ); </script
   >

The topic ‘New redirection method’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)

 * 0 replies
 * 1 participant
 * Last reply from: [Rafael Oliveros (Kazzabe)](https://wordpress.org/support/users/kazzabe/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/new-redirection-method/)
 * Status: not a support question