Search code examples
.htaccesshttp-status-code-301http-status-code-401mod-alias

301 will not redirect to Facebook page


In Google search console, I have 3 url's that will not redirect. They are all facebook url's and are similar to this:

Redirect 301 /author/amy/feed/%20www.facebook.com/heatfinders https://www.facebook.com/heatfinders

I'm pretty sure its something to do with the '%' in the url. Still getting a 401 instead of it going to the correct Facebook page.


Solution

  • You can use RedirectMatch and \s to match a space in the uri.

    RedirectMatch 301 ^/author/amy/feed/\swww\.facebook\.com/heatfinders$ https://www.facebook.com/heatfinders