Issue with dynamically passing the original URL in the ref parameter
-
Hello, I’m using the Redirection plugin to manage redirects on my website, and I’ve encountered an issue with dynamically passing the original URL in a parameter. Here are the details:
My redirect settings:
- Source URL:
^/offers/(.*)
- Target URL:
/page-no-longer-exists/?ref=/offers/$1
- HTTP Code:
301 - Moved Permanently
Expected behavior:
I would like a user visiting, for example, the URL/offers/dog-leash
to be redirected to:/page-no-longer-exists/?ref=/offers/dog-leash
Current issue:
Instead of the dynamic value in theref
parameter, after redirection, I see the URL as:/page-no-longer-exists/?ref=/offers/
It seems
$1
is not being correctly interpreted as the captured value from the Source URL.My question:
- Is my Target URL configuration correct?
- How can I pass the dynamic portion of the URL (e.g.,
dog-leash
) to theref
parameter in the Target URL? Does this require a different syntax?
This feature is critical for me, as the
ref
parameter is later used in a form (CF7) on the destination page.Thank you for your help, and I look forward to your guidance.
- Source URL:
- You must be logged in to reply to this topic.