2

Google Search Console has some crawl errors and can't find these links:

home-third-blog-posts/page/10/
home-third-blog-posts/page/5/
home-third-blog-posts/page/7/
home-third-blog-posts/page/9/

And my Redirect rule in .htacces looks like this

Redirect 301 /\/home-third-blog-posts\/.*/s http://foo.com

My Regex-Tester says its correct but when i test the links the redirect doesn't work. What did i do wrong?

hjpotter92
  • 78,589
  • 36
  • 144
  • 183
moeses
  • 497
  • 1
  • 6
  • 21

1 Answers1

2

If you look at the documentation for Redirect directive, you'll see that it does not accept regex/patterns. You should be using the RedirectMatch instead:

RedirectMatch 301 /home-third-blog-posts/.* http://foo.com

also, no need to escape the / characters.

hjpotter92
  • 78,589
  • 36
  • 144
  • 183