Please see the guide, specifically the section about testing expressions and escaping characters.
https://redirection.me/support/redirect-regular-expressions/
Hi John,
I’ve read the guide and also tested my expressions on regex101. According regex101 they should work. I currently have the following non working redirects.
source: [\/]nl[\/]search\?controller=search&s=(.*)
target: /?product_cat=&s=$1&post_type=product
source: [\/]nl[\/]order-confirmation\?.*
target: /
source: [\/]nl[\/]index.php\?.*
target: /
Cheers,
Jaap
Changed them to this but still not working (the search one is working now):
source: \/nl\/order-confirmation\?.*
target: /
source: \/nl\/index.php\?.*
target: /
Regex option has been set btw.
Example url: https://www.carpwhisperer.com/nl/index.php?controller=order-detail&id_order=24939
and: https://www.carpwhisperer.com/nl/order-confirmation?id_cart=49567&id_module=28&id_order=25719&key=45e27f206a9398d94ac06b244275dea9
Cheers,
Jaap
-
This reply was modified 4 years, 9 months ago by
Jaap de Wit.
You don’t need to escape the / character.
Have you cleared your browser cache?
Hi, yes cleared my cache and also WpRocket cache. I removed the \ from the source.
source: /nl/order-confirmation\?.*
target: /
source: /nl/index.php\?.*
target: /
So this should be ok right? I see an increasing hitscore so they must be working I think. The one with order-confirmation does work now but the one with index.php doesn’t at my end. Both tested in private browser.
but the one with index.php doesn’t at my end
Details for that here: https://redirection.me/support/problems/url-not-redirecting/
Hi John,
Yes, I need to do this with htaccess I think. Will look into that.
Thanks for your help so far.
Cheers,
Jaap