Viewing 4 replies - 1 through 4 (of 4 total)
  • try
    from:
    (?i)\/product-category\/(.*)

    to:
    /destination-page

    The (?.i) makes the test string case-insensitive. Are you also trying to catch requests via FTP? I’m pretty sure that’s beyond the scope of what Redirection or WordPress can handle. You don’t need to specify http or the hostname in general, and can just focus on the path.

    Thread Starter centurypixel

    (@centurypixel)

    Thank you Gabe462. However, it didn’t work me. I have made sure to select regex option too. Maybe it has to do with my server. Who knows.

    I will try to find a way to do it using htaccess

    Thanks again.

    We can try a bit more, it should work- I’m pretty sure regex is interpreted via PHP, so there shouldn’t be anything that can break it on your server.

    What happened when you went to one of the /product-category/urls ? Just no redirect? What about just going to /product-category/ ?

    Here’s that regex demonstrated in a great learning tool: https://regex101.com/r/sP0sD6/4

    Thread Starter centurypixel

    (@centurypixel)

    Hello Gabe462,
    It is working now. I am not sure how, but it is working. So no worries. Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Problem with RegEx’ is closed to new replies.