Title: Using variable in URL
Last modified: May 4, 2020

---

# Using variable in URL

 *  Resolved [hkalrain](https://wordpress.org/support/users/hkalrain/)
 * (@hkalrain)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/using-variable-in-url/)
 * Hello, I must say thanks to you for such a wonderful plugin. I have a situation
   where I want to redirect a page such as [http://localhost/ul/profile](http://localhost/ul/profile)
   to [http://localhost/ul/members/<logged](http://localhost/ul/members/<logged)
   user id>/profile.
 * This is something I can not even achieve using the regexp and I want to utilize
   logged user id to redirect to a dynamic link.
 * Is it possible to achieve this by redirection plugin?
 * Please advise.

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

 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/using-variable-in-url/#post-12782797)
 * You can put `%userid%` in the target URL and it will be replaced with the user’s
   ID
 *  Thread Starter [hkalrain](https://wordpress.org/support/users/hkalrain/)
 * (@hkalrain)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/using-variable-in-url/#post-12787432)
 * Thank you John. Much appreciated.

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

The topic ‘Using variable in URL’ 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

 * [variable](https://wordpress.org/support/topic-tag/variable/)

 * 2 replies
 * 2 participants
 * Last reply from: [hkalrain](https://wordpress.org/support/users/hkalrain/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/using-variable-in-url/#post-12787432)
 * Status: resolved