• The plugin redirects ok, but without exception. It INCLUDES the WordPress admin. How do I stop this?

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Micah Wood

    (@wpscholar)

    @bw3em The Simple Website Redirect plugin doesn’t do any redirects of the WordPress admin, so I would guess you may have something else triggering that.

    It is important to realize that browsers cache 301 redirects, so if you’ve attempted a full site redirect in another plugin, you may still be redirected even after that plugin is disabled.

    The easiest way to tell if the redirect is caused by my plugin is to look at the X-Redirected-By header. WordPress sets this header for any redirect performed using standard WordPress functions (which my plugin uses). Additionally, I’ve customized the redirect header to contain the name of the plugin.

    Typically, I would use redirectcheck.com to check redirects, but since you’re experiencing a redirect in the admin area I can’t really look into it.

    It looks like this Chrome extension might be a good way to check for the redirect header: https://chrome.google.com/webstore/detail/link-redirect-trace/nnpljppamoaalgkieeciijbcccohlpoh?hl=en

    Plugin Author Micah Wood

    (@wpscholar)

    If the login page is also redirecting, then you can share your site URL and I can look into the redirect there if you like.

    I also realized that the real question here is probably how to disable the redirection when you can’t access the WordPress admin to turn off the plugin. Unfortunately, in this situation, you’d have to go into the filesystem on the server and delete the plugin. You would then have to clear your browser cache to clear the 301.

    Thread Starter bw3em

    (@bw3em)

    The description of the plugin…

    Description
    The Simple Website Redirect plugin allows to you redirect an entire website (except the WordPress admin) to another website.

    …leads me to believe I, as admin/logged in, can view the frontend without being redirected!

    I can get into the backend fine but cannot view the frontend.

    Does this make sense?

    Plugin Author Micah Wood

    (@wpscholar)

    Oh, I see. No, you won’t be able to view the front end of the site even if you are logged in. You will be able to view the WordPress admin (backend).

    From a technical perspective, there are issues with trying to conditionally handle 301 redirects based on whether someone is logged in. The biggest one is that if you visit the front end, then log in, the browser has already cached that redirect and will bypass any code that would do a login check.

    It is possible to work around this, however. There is an advanced settings section on the plugin settings page that lets you prevent redirects based on the “Excluded Query Parameters” setting. If you were to set, let’s say, noredirect as the value in that field, you can then append ?noredirect to any front-end URL to view it without being redirected. This does mean you’ll need to copy a front-end link from the WordPress admin, append that URL parameter, and then load the page to view it.

    Same here, it’s still redirecting my wp-admin, I’ve deleted your plugin and clean cache but still don’t work for me.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Exclude WP admin from redirect’ is closed to new replies.