1

Recently I moved my website from Blogger to own host with Apache (see this post).

After migrating and make the necessary 301 redirects, I deleted that Blogger site. However, I'm receiving several alerts "404 Page Not Found" in Google Webmasters Tools. Most are related to the old urls for mobile devices, example: example.com/2015/oldurl.html?m=1 and example.com/2015/oldurl.html?m=0

There is a method to force a 301 redirect these mobile URLs for my home page or another page hosted on the new host? Maybe some command in .htaccess?

Any suggestion?

Thanks in advance.

Community
  • 1
  • 1
matheo jean
  • 101
  • 6

1 Answers1

0

You can use this code in your DOCUMENT_ROOT/.htaccess file:

RewriteEngine On

RewriteCond %{QUERY_STRING} (^|&)m=[^&]+ [NC]
RewriteRule ^ http://example.com/? [L,R=301]
anubhava
  • 761,203
  • 64
  • 569
  • 643