How can I redirect some pages to new subdomain?

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]

Topic subdomains domain-mapping redirect plugins Wordpress

Category Web


Cloudflare is usually used as a CDN, just to deliver parts of the site like images. In a typical setup, you would not set up redirects at all. You just use their plugin and it automatically pulls images and similar assets from the CDN instead of your domain.

If instead you are trying to set up a site that has multiple subdomains, a redirect alone won't do it; you will probably want to remove the Redirection plugin unless you are actually moving Pages or Posts from the main site to the new review site. You will need to convert the original site https://example.com to a Multisite and choose the subdomain option, rather than subsites in subfolders. Then, you can add a subsite for reviews.example.com and set up your desired content there. You will also need to update your DNS settings so this subdomain actually exists. Most hosts and DNS providers can help you figure out what settings are needed where to make this happen.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.