I am having an issue with important redirect rules which I need to set-up. Well, “may have an issue”, as I am unsure how the syntax should be, and thus don’t want to crash my site a dozen times trying to get it right.
Presently I have redirect rules in my root .htaccess that look like…
rewriterule ^old-version-page/ https://web.site/path/to/new-page-version/ [R=301,L] rewriterule ^another/old-example/page/ https://web.site/path/for_some-other/new-page/ [R=301,L]
…and they all work without a hitch. But the ones which I have to configure now have individual query strings. Examples:
old-site.com/?p=164
old-site.com/?p=6320
old-site.com/?p=2357
And ‘no’, I cannot use their alt. URLs. Each old page number would be going to a unique new page (which have different page numbers; and ‘yes’, I know that I need to check for numerical overlaps and correct such issues first). Now my problem is concerning what syntax to use for the redirects, as I know that certain characters (ex. ‘?’) must be escaped or substituted for everything to go right (rather than everything turning dead-white per se). I saw how to set up redirects that involve groups of query strings (ex. redirecting all pages with “?p=” to wherever), but not how to do so for specific queries (unless I’ve missed it somewhere).
Thanks in advance.