• Resolved mark_l_sanders

    (@mark_l_sanders)


    I’ve got Redirect on a multisite install.

    I may have discovered a bug that occurs when a redirection for an entire site is created:

    As soon as an entire site is redirected, the plugin breaks, reporting that the REST API cannot be fetched – I’m guessing this is because it is trying to access domain.com/<site-name>/wp-json…….but all <site-name> has just been redirected.

    Result: I can enable a ‘full-site’ redirection, but then cannot access the plugin to edit/cancel that redirection without deactivating the plugin.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter mark_l_sanders

    (@mark_l_sanders)

    Update: if I deactivate the plugin in the above scenario, all is good….as soon as I reactivate it (thinking: i’ll update/edit teh redirect), the original ‘site-wide’ redirection kicks in again and prevents me from accessing the redirect.

    Plugin Author John Godley

    (@johnny5)

    What do you mean by a redirection for an entire site – how are you doing this?

    Thread Starter mark_l_sanders

    (@mark_l_sanders)

    Hi John
    I’m in the Dashboard of one of the member sites (it’s a multisite install), and I’m on the settings page for the ‘Redirection’ plugin.

    There are various options: Groups | Site | Log | 404s | Import/Export | Options | Support.

    I’ve chosen the ‘Site’ option (my url: https://hub.salford.ac.uk/welfare-at-a-social-distance/wp-admin/tools.php?page=redirection.php&sub=site) which allows me to redirect the entire site.

    Thanks
    mark

    Plugin Author John Godley

    (@johnny5)

    I have to admit I’m not sure of the behaviour of that option on multisite. I’ll need to test.

    Thread Starter mark_l_sanders

    (@mark_l_sanders)

    Hi John
    I’ve now disabled the relevant rule at the Network level.

    I’ve archived/disabled the local site – the one where I’d set up the ‘Site -> Site’ redirection that was preventing me from accessing the ‘Site’ option to delete that rule – but a faulty redirection is still occurring.

    The fault is that I wish to redirect ALL URLs to a single new home page, but the redirection is insisting on appending the page stub to the domain – which causes 404s as all pages have changed!

    Is there any way I can find where the redirect rule has been stored and delete it manually?

    Thread Starter mark_l_sanders

    (@mark_l_sanders)

    Here’s a summation:

    I’ve got Redirection activated on my ‘member site’.
    There’s a site->site redirect on that site which seems to be preventing the plugin from working correctly on that site.

    I’ve got Redirection available on the multisite ‘main site’ – that contains a REGEX redirect – this redirect seems to make no difference to this issue, so I’ve now deleted it.

    If I disable Redirection on the member site, no redirection takes place (obviously).
    If I enable Redirection, then the following behaviour occurs:

    Plugin Author John Godley

    (@johnny5)

    A site redirect will always redirect to the same URL on the target site. If you want to redirect everything to the home page then you will need to create your own regular expression redirect.

    If a redirect is still occurring then it is part of your configuration on one of the sites.

    Thread Starter mark_l_sanders

    (@mark_l_sanders)

    Hi John
    The main issue is that I can’t access the Site Configuration on the ‘broken’ site. Is there any way I can edit that configuration manually, so I can remove the offending rule?

    Where is the configuration stored? Is it written to file or stored in the database?

    thanks
    m

    Plugin Author John Godley

    (@johnny5)

    You can use this to disable redirects in order to change settings: https://redirection.me/support/disable-redirection/

    Thread Starter mark_l_sanders

    (@mark_l_sanders)

    Hi John
    I’ve sorted everything out:

    • Your hint about disabling redirection allowed me to access the member site’s ‘Site Redirection’ config page without error – so I could delete the problematic ‘site redirection’.
    • I then added – to the member site’s ‘Redirects’ config page – a new RegEx redirect as follows: Source URL set to (.+); Target URL set to the target
    • I removed the site redirect I’d added at the ‘top level’

    So all good….many thanks for your multiple replies to me – very much appreciated (as is the plugin).

    mark

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Site redirects break access to wp-json’ is closed to new replies.