• Resolved michaldybczak

    (@michaldybczak)


    First when I set it, simple redirect worked. I wanted to do:

    /oldpage/bananas => /oldpage/(bananas) => /newpage/$1 => /newpage/bananas

    So I set

    /shop/(.*)
    https://mynewsite.pl/shop/$1

    No change, it did only simple redirect but sites further down weren’t redirected. I checked REST API and it works.

    I walked away from computer for few house to do some house chores, then went back to computer and… even simple redirect didn’t work. It looked like the redirects stop working entirely. REST API still works.

    Not sure what to do further but instead giving the plugin bad rating I write here just in case.

    I’ll try to go with .htaccess route.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author John Godley

    (@johnny5)

    I’m not sure what you mean by the first part about bananas, but your regex /shop/(./*) seems wrong. Did you mean /shop/(.*)? Is the second line the target? That would create a redirect loop

    What do you mean by a simple redirect works, but sites further down dont? Can you provide a real URL?

    Redirects don’t require the REST API

    Thread Starter michaldybczak

    (@michaldybczak)

    Sorry, that was mistake while writing. I corrected that and I did set it /shop/(.*)
    Maybe I made mistake by forgetting to add that this is a multisite install and shop page is set as the main one for the sub-site.

    I tried again simple redirect and it works:

    /shop/
    https://mynewsite.pl/shop/

    The bananas example is from your site about regular expressions so I thought you will get it right away without writing too much.

    I just want all pages down the lane from /shop/ be redirected to new domain so for example:

    /shop/product1/
    https://mynewsite.pl/shop/product1/

    shop/product1/product1.jpg
    https://mynewsite.pl/shop/product1/product1.jpg

    etc.

    If your plugin is not meant for multisites, I never noticed the info.

    EDIT: That’s weird. After making it work with simple redirect, I set again:

    /shop/(.*)
    https://mynewsite.pl/shop/$1

    and it works, well, partially. It works like simple redirect but doesn’t redirect anything past /shop/ part.

    Thread Starter michaldybczak

    (@michaldybczak)

    OK, by testing I figured out that this was browser’s cache messing it (I don’t have any cache on my site enabled thou). So basically simple redirect like this works:

    /shop/
    https://mynewsite.pl/shop/

    When I add:

    /shop/(.*)
    https://mynewsite.pl/shop/$1

    Then it doesn’t work at all, no redirection, only cache was remembering it and redirecting simply.

    I am clearly missing something or this isn’t working on multisite.

    • This reply was modified 6 years, 4 months ago by michaldybczak.
    Plugin Author John Godley

    (@johnny5)

    Did you enable the regex checkbox?

    Can you give me an example of a full URL that isn’t working?

    Thread Starter michaldybczak

    (@michaldybczak)

    Wow! Thanks, it’s working now as I wanted!

    Strangely, I noticed regex box and link on the beginning when I started wondering how to make more advanced redirects, so I found your site about regular expressions but when I went back to settings, I forgot about the checkebox and was totally blind to it.

    So simple solution and I was already about to give up on it. I didn’t expect so quick answer and I just posted here just in case there was some bug that needs to be fixed. I guess regex checkbox and maybe info on your site about it should be more prominent, but function wise, your plugin is awesome!

    Thank you again!

    5 star review is coming :).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Doesn’t work’ is closed to new replies.