• Resolved christer_f

    (@christer_f)


    I have successfully used this excellent plugin for a long time. Recently I have a problem with redirects not working on localhost (running Macos and Apache). I suspect this started when I moved my server to HTTPS, using the process described here: https://gist.github.com/llapgoch/c8f164421aa22d703413f60791b96ddd

    I did this in order to enable the WP REST API. Having no idea of how this plugin works, is reasonable to think that this is why redirects don’t work? Can anything be done, or should I go back to HTTP?

    FYI: I have disabled ALL other plugins and activated a standard theme (2025)

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

    (@johnny5)

    How did it stop working? I don’t have enough information to know if your local setup is causing problems with redirects, but http or https makes no difference to Redirection.

    Thread Starter christer_f

    (@christer_f)

    There is no redirection, which means I end up on a non-existing page, which is the redirection source.

    For example:

    Parameters to the redirect: Exact match, URL Only, Redirect to URL

    The target exists and accessing it directly works fine.

    Activating the redirection check says “ERROR.

    Something went wrong obtaining this information. It may work in the future.

    Invalid request parameter

    Thread Starter christer_f

    (@christer_f)

    I just saw that when doing the check there is an error in the JS console:

    Failed to load resource…: https://apis.redirect.li/….. (followed by parameters).

    Thread Starter christer_f

    (@christer_f)

    Got it working. I saw that the parameter to the call I had seen in the JS console has an URL like: https://localhost/<page_slug&gt; but my wordpress is not running on the Web root, so it should be https:://localhost/<project_name>/www/<page_slug>.

    Changing the redirection to also include <project_name> and “www” in both source and target did the trick.

    Having said this, I do not think this was necessary before, or am I wrong? Or do I miss something in the settings? (This is new project I’m working on, and I just migrated the production server to my local environment).

    And please notice: while the redirection works, there is still the error in the JS console

    • This reply was modified 1 year, 2 months ago by christer_f.
    Plugin Author John Godley

    (@johnny5)

    You can only check internet accessible sites, it is not possible to check local sites.

    Having said this, I do not think this was necessary before, or am I wrong? Or do I miss something in the settings?

    I can’t say how your site is configured. Redirection just expects the URL to match to the ones it is configured with. Maybe you need to adjust your WordPress URL settings.

    Thread Starter christer_f

    (@christer_f)

    Thanks for your help, John. I exported all my redirects to a CSV file, fixed things and re-imported. All is fine.

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

The topic ‘Redirect stopped working on localhost after enabling HTTPS’ is closed to new replies.