: Google finding non existant URLs on my site and 301 redirects failing I have been checking webmaster tools and found that Google has picked up some soft 404s. The weird thing is there are
I have been checking webmaster tools and found that Google has picked up some soft 404s.
The weird thing is there are no such pages on my site and I dont know how Google has come up with these URLs.
There are over a dozen in total and here is a few examples:
mywebsite.com/products/manufacturers.php?&l=a www.mywebsite.com/products/manufacturers.php?&l=b mywebsite.com/products/manufacturers.php?&l=c
They basically just have a different variable at the end.
So I have tried doing a 301 redirect to our home page like so:
RedirectMatch 301 ^/products/manufacturers.php?&l=(.*)$ /
But it doesn't work it just send me to the custom error page because obviously the page its looking for doesn't exist.
I also tried a rewriteRule instead of a 301 redirect but that didn't work either.
Does anybody have any idea how I can make the redirect work so I can remove these from webmaster tools?
More posts by @Megan663
1 Comments
Sorted by latest first Latest Oldest Best
It seems that there is some mistakes in your regex.
Have you tried like bellow :
RedirectMatch 301 ^products/manufacturers.php?&l=(.*)$ /
EDIT: Is products/manufacturers.php a real page of your site ?
Otherwise you could use
RewriteEngine on
RewriteRule ^products/manufacturers.php(.*)$ / [L,R=301]
Tell me if it works
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.