I’ve migrated (Google) Blogger blog into WordPress.com.
The blog is rather large (300+ posts) and I still get 404s multiple times a day due to URLs ending with ?m=1
query param.
e.g.
https://softwarearchiblog.com/2019/01/technical-debt.html?m=1
will yield HTTP 404, while
https://softwarearchiblog.com/2019/01/technical-debt.html
works fine
I use the Redirection Plugin, which does a fairly good job for various other issues – but I can’t define a proper expression in its language.
The issue is around not being able to define the target URL as a regex:
-
Is there any way around it?
-
Is there any other plugin that will "do this work" and can live side-by-side with Redirections?
-
Since I work with hosted WordPress.com – I understand I cannot modify the
.htaccess
file for a more generic redirect. Any other way to do it?
2
Answers
With the Redirection Plugin you can ignore the query parameters:
https://redirection.me/support/matching-a-url/
But I think you’ll need an entry for each of your posts.
I think, it’s possible to do using javascript. You might put this code in the
header.php
or404.php
file (it depends on your theme) or use this plugin to insert the code Insert Headers and Footers