Help with Regex
-
Long story short, I have multiple domains that all resolve to basically one site.
https://mydomain-1.com/about-us.php
https://mydomain-2.com/about-us.php
https://mydomain-3.com/about-us.phpThey are the same but they all resolve.
I’m trying to redirect everything from domain 2 and 3 to domain 1 using the Redirection plugin and regex.
Here’s my regex:
Source: ^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})(\/about-us.php$)
Target: https://mydomain-1.com/about-us.phpI tested the regex at regex101.com and it matches fine but when I try to hit the page, it doesn’t redirect properly. I get a 404 logged.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Help with Regex’ is closed to new replies.