Option to choose the query parameter used for redirects
See original GitHub issueWhen executing a filter rule, in the case when a request URL has multiple query parameters that are valid URLs, RequestControl currently picks the first one as the URL to redirect to. I’d like to have a way to specify that a particular named parameter is the one to use.
For example, the outbound links on vulture.com
articles (example), when clicked, take you through a go.redirectingat.com
URL that includes an sref
parameter which contains the URL of the article you’re coming from, as well as a url
parameter that contains the URL I’d like to be able to redirect to. But since sref
precedes url
, a filter redirect would just dump me back to where I came from.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Using Query Parameters With Redirects - AIOSEO
With the Redirection Manager in All in One SEO, you can choose how you redirect both URLs above (the one with and without...
Read more >URL Redirect with Parameters - Domains - Namecheap.com
You can use URL Redirect to forward your visitors to a specific page at the destination URL and pass values via query strings...
Read more >Matching a URL - Redirection.me
At the heart of Redirection is the ability to match a URL and then do something. A URL looks like this: http://example.com/path/to/something?query=param.
Read more >Pass url params in rewrites and redirects · Issue #97 - GitHub
i.e. /test to another domain i.e. https://example.com/test . The redirect works as expected, but if I try to add some url parameters, /test?...
Read more >Query Params Rule Documentation - Requestly
Select Query Param Rule Since Requestly supports multiple rule types, when you click on Add Icon, it takes you to Rule Type selection...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
These should work too:
Improvements are always welcome! 😃
It seems a shame to make people write a manual regex parser like
{search/.*[?&]url=([^&]*).*/decodeURIComponent($1)}
instead of{search.url}
. TheURL
class already parses search parameters into a Map calledsearchParams
; it would be easy for you to parse{search.whatever}
into a redirect pattern that resolvesrequestURL.searchParams.get('whatever')
. Why ask users to do that work with regexes?