Title: Unexpected regex behaviour
Last modified: November 16, 2021

---

# Unexpected regex behaviour

 *  Resolved [billbennett](https://wordpress.org/support/users/billbennett/)
 * (@billbennett)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/unexpected-regex-behaviour/)
 * I have this as a Regex redirect:
 * /journalism-fine-mass-media-business-models-ailing.*
 * redirecting to:
 * [https://billbennett.co.nz/new-zealand-technology-journalism-twilight-years/](https://billbennett.co.nz/new-zealand-technology-journalism-twilight-years/)
 * The idea is that it would pick up a URL like:
 * [https://billbennett.co.nz/journalism-fine-mass-media-business-models-ailing/featured-image-19590/](https://billbennett.co.nz/journalism-fine-mass-media-business-models-ailing/featured-image-19590/)
 * Which it does… but it stores the .* part of the URL and adds that to the new 
   one, so my redirect goes to:
 * [https://billbennett.co.nz/new-zealand-technology-journalism-twilight-years/featured-image-19590/](https://billbennett.co.nz/new-zealand-technology-journalism-twilight-years/featured-image-19590/)
 * How can I rewrite this so that it doesn’t store and forward the .*
 * I thought I would need to use (.*) in the source and $1 in the target for Regex
   to do the storing and forwarding.

Viewing 1 replies (of 1 total)

 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/unexpected-regex-behaviour/#post-15076212)
 * You can find details of your redirect here:
 * [https://redirect.li/http/?url=https%3A%2F%2Fbillbennett.co.nz%2Fjournalism-fine-mass-media-business-models-ailing%2Ffeatured-image-19590%2F](https://redirect.li/http/?url=https%3A%2F%2Fbillbennett.co.nz%2Fjournalism-fine-mass-media-business-models-ailing%2Ffeatured-image-19590%2F)
 * You appear to have configured it wrong

Viewing 1 replies (of 1 total)

The topic ‘Unexpected regex behaviour’ 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

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

 * 1 reply
 * 2 participants
 * Last reply from: [John Godley](https://wordpress.org/support/users/johnny5/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/unexpected-regex-behaviour/#post-15076212)
 * Status: resolved