Title: User input Redirect
Last modified: January 31, 2018

---

# User input Redirect

 *  Resolved [weblicitysa](https://wordpress.org/support/users/weblicitysa/)
 * (@weblicitysa)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/user-input-redirect/)
 * Is it possible to use this plugin to create a redirect list by user input? The
   user should input “1234” and this creates the following redirect:
    Source – [http://www.mysite.co.za/1234](http://www.mysite.co.za/1234)
   Target – [http://www.mysite.co.za/username](http://www.mysite.co.za/username)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/user-input-redirect/#post-9934125)
 * This is something you will need to code yourself. You can use Redirection to 
   create the redirects based on user input.
 * Note that you will need to be very careful about sanitizing the data to prevent
   users from creating a redirect to another site
 *  Thread Starter [weblicitysa](https://wordpress.org/support/users/weblicitysa/)
 * (@weblicitysa)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/user-input-redirect/#post-9951990)
 * Thank you. Can you please assist me on the php code I would use to update a specific
   target URL if I have the source URL or name of the redirection.
 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/user-input-redirect/#post-9953558)
 * You can create a redirect with Redirect::create, and update one with Redirect::
   update. The functions for both these are in `wp-content/plugins/redirection/models/
   redirect.php`. The data supplied to both is defined in `Red_Item_Sanitize` in
   the same file.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘User input Redirect’ is closed to new replies.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [John Godley](https://wordpress.org/support/users/johnny5/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/user-input-redirect/#post-9953558)
 * Status: resolved