• Hello,

    So I wrote a redirect in my .htaccess file like this:

    RedirectMatch 301 ^/browser-sync/browser-sync-client.js /?

    I found on other forums that my adding the “?” to my redirect url, any query string will be stripped out. Well that part works fine but now when it redirects, the “?” still remains. How can I redirect with no query string and no ? in the redirected url?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    In what way does this relate to WordPress? I suggest you inquire in a forum dedicated to Apache or .htaccess support.

    Thread Starter potentdevelopment

    (@potentdevelopment)

    @bcworkz this relates to WP because I’m getting a bunch of 401 recorded from previous plugin files which I’m trying to redirect back to my homepage.

    Moderator bcworkz

    (@bcworkz)

    Something is not right if you get plugin file requests for plugins that no longer exist. The proper solution would be to not allow this to happen in the first place by correcting the referring source. But if you prefer to just redirect, that’s OK too, it’s your site.

    Try using RewriteCond/RewriteRule directives to redirect to your home page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing Query String and Question Mark From Redirect’ is closed to new replies.