• With the redirection plugin, most redirects work fine. If I redirect to a search query, though, the page does not load. If I put the same URL in the browser, it loads properly. For example,

    If I try to redirect to “http://www.example.com/?s=boots” an empty page loads, even though it is a valid URL if I paste it into a browser. My use case is actually a bit more complex and uses regex, but this is a simple redirect that illustrates the problem. This worked fine for many years, but at some point apparently stopped working as before.

    My redirect is a pass-through that retains the original URL in the address bar.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Try using a relative URL

    • This reply was modified 9 years, 4 months ago by Gal Baras.

    You can also try using a RegEx redirect and use this format:
    ^/my-old-page-url\.html.*(?=\?)

    This will carry the query string along with the new url, if that’s something you’re looking for.

    Thread Starter fubaru

    (@fubaru)

    Bingo! @galbaras, changing to a relative URL did the trick. Very odd, as an absolute URL worked for years in this redirect, and still works for non-query destinations. I vaguely recall trying relative destination URLs years ago, and running into problems. Regardless, it’s working. (Didn’t have to resort to your suggestion, @mnizinski, but I’ll keep in mind the next time this fails!) Thanks for the help!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Redirect to URL with query string not working’ is closed to new replies.