Title: Regular Expressions
Last modified: July 22, 2021

---

# Regular Expressions

 *  Resolved [Rik0399](https://wordpress.org/support/users/rik0399/)
 * (@rik0399)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/regular-expressions-4/)
 * Hi John,
 * I have a small issue if you can help, please
 * Seeing plugin message :
 * ——————————————————————————
    Regular Expressions > Problem > Too many regular 
   expressions may impact site performance ——————————————————————————
 * I get tons of these > /listing/freightland/ so addded /listing/freightland/(.*)
   to go to > /category/travel/transport/
 * Also, I have someone screwing with my site deliberately creating tons of 404 
   using variations upon listing i.e. wp-content/ and as you may expect, takes hours
   to fix them but I think I’m still not getting how to use the expressions in order
   to redirect them correctly?
 * I would appreciate it 🙂
 * Many Thanks
 * Rik

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

 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/regular-expressions-4/#post-14690948)
 * It is not necessary to ‘fix’ all 404s. You should fix ones that are the result
   of a problem on your site, and the rest you can ignore. You shouldn’t be spending
   hours doing this.
 *  Thread Starter [Rik0399](https://wordpress.org/support/users/rik0399/)
 * (@rik0399)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/regular-expressions-4/#post-14727000)
 * Hi John,
 * Here’s the issue I’m having :
 * I get tons of 404’s, which you would agree, is bad for SEO.
 * As an example, both bing and google are reporting the following as 404
 * /stationery-tips-tricks/SHARE%20THE%20LOVE
 * So to fix this I tried this :
 * /stationery-tips-tricks.* to redirect to /stationery-tips-tricks/
 * I also tried this :
 * /stationery-tips-tricks/.* to redirect to /stationery-tips-tricks/
 * Can you suggest which is the best way, please?
 * Many Thanks
 *  Thread Starter [Rik0399](https://wordpress.org/support/users/rik0399/)
 * (@rik0399)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/regular-expressions-4/#post-14727117)
 * Hi,
 * Adding to the above issue,
 * No matter what I try and do, even using :
 * ^/stationery-tips-tricks/.* to redirect to /stationery-tips-tricks/
 * When I test in the browser, “too many redirects”
 * But in incognito, it works?
 *  Thread Starter [Rik0399](https://wordpress.org/support/users/rik0399/)
 * (@rik0399)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/regular-expressions-4/#post-14799291)
 * Hi John,
 * I have a ton of 404 every day, many from hackers trying o use wp root files, 
   I have tried all sorts of permutations to stop them.
 * As an example, I have this :
 * /category/fashion/jewellery/SHARE%20THE%20LOVE
 * So I tried :
 * ^/category/fashion/jewellery/.*
    ^/category/fashion/jewellery/*.* /category/fashion/
   jewellery/.* /category/fashion/jewellery/*.*
 * With and without REGEX and whilst it may work in the incognito browser, it does
   not in normal browser.
 * Turn off Cloudflare and cache plugin but I’m still getting 404.
 * Any ideas, please?
 * Many Thanks

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

The topic ‘Regular Expressions’ 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/)

 * 4 replies
 * 2 participants
 * Last reply from: [Rik0399](https://wordpress.org/support/users/rik0399/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/regular-expressions-4/#post-14799291)
 * Status: resolved