redirecting ?page_id=2 to page about
-
Hello I have a peculiar problem: I was tasked with redirecting a WP page (?page_id=2) to the page (about) on the same domain, however when I use the string redirect:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^page_id=2$
RewriteRule ^(.*)$ https://example.com/about? [R=301,L]…it redirects all pages ?page_id=2 that are located on the site like
en/?page_id=2 , ok/?page_id=2 , en/ok/?page_id=2
Is there a way to specifically redirect only the “root” page ?page_id=2 and leave the other as they are?
And what about if in the future i want to redirect some of the sub pages for example en/ok/?page_id=2 to en/ok/about?
Sorry for my bad English – if I can provide additional clarification, please ask away.
- The topic ‘redirecting ?page_id=2 to page about’ is closed to new replies.