Can cloudflare map a subfolder to another website or domain

I have a website in xxxx.domain.com*
Another website. www.yyyy.com

What i need is to have xxx.domain.com* in www.yyyy.com/xxxx*

I alredy solved GET , but i need to solve as well the POST methods. in order to be able to replicate a ecommerce, etc…

Some help, pls

May I ask, isn’t there a way at the origin host, the easier way, to create a sub-domain and move the files from the yourdomain.com/sub-directory/ to the sub-domain.yourdomain.com? - just being curious here.

  • I remember there was a way to do rewrites using .htaccess

I believe there is some way using Cloudflare Page Rules and Forwarding URL option, possibly.

Haven’t tried yet, cannot confirm.

Wait a bit, you have two different domains? and want to redirect from one sub-domain to other domain directory?

If so, maybe this one:

If the URL matches:
*xxxx.domain.com/*

Then the settings are:
Forwarding URL - 301 Permanent Redirect
https://www.yyyy.com/xxxx/$2

Hopefully, you would move the needed files from xxxx.com to yyyy.com/xxxx/ to make sure they exist and work.

https://support.cloudflare.com/hc/en-us/articles/200172286-Configuring-URL-forwarding-or-redirects-with-Cloudflare-Page-Rules

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.