plugins – How can I redirect some pages to new subdomain?

Question

I have main domain as https://example.com. I added in cloudflare new subdomain as reviews.example.com. In wordpress I use redirection plugin and change url from https://example.com/some/path/some_post to https://reviews.example.com/some/path/some_post. And redirect work but it is redirecting to example.com again. The cyclic redirect is happening. All pages from reviews.example.com redirecting to example.com. Why is it happened? How can I get reviews.example.com if I use it in brouser address line? I have one WP instalation. I don’t want to create new WP app for this pages (reviews.example.com). I try change it in .thaccess for /some/path/some_post but it is not working:

RewriteCond %{REQUEST_URI} ^/some/path/some_post/ [NC]
RewriteRule ^(.*)$ https://example.com/test-name [R=301,L]

or

RewriteCond %{REQUEST_URI} ^/some/path/some_post/ [NC]
RewriteRule ^(.*)$ https://reviews.example.com/some/path/some_post/ [R=301,L]

0
Dmitrii 1 month 2021-10-21T01:25:32-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse