Streaming live at 10am (PST)

Hosting two Webflow sites on the same domain with the second site in a subfolder

Has anyone hosted two Webflow sites on the same domain with the second site in a subfolder? I want to utilize two different themes (example one company theme and blog publication theme).

www.example.com -> Webflow Site 1
www.example.com/blog -> Webflow Site 2

The easy route would be to point the second site to a subdomain like blog.example.com, but I prefer subfolder. It appears Webflow has a href-prefix feature that works if Site 1 is hosted elsewhere and using reverse proxy in the .htaccess settings. But in this case Site 1 is also Webflow, and my understanding is we can’t change .htaccess settings in Webflow. I also looked into DNS settings, and again the issue is DNS cannot direct to a subfolder.

Any help appreciated :pray:

Okay, I figured it out. Using the same solution for reverse proxy, I just created two rules. Therefore I pointed the domain DNS records to a server that has .htaccess, in our case, AWS EC2 instance. You should be able to use any server. The server is just an empty shell, since all traffic is being redirected.

In Webflow, for each site we connect a subdomain. And in .htaccess we point to these subdomains. Reverse proxy settings below.

ProxyRequests on
ProxyPass "/subfolder" "https://subdomain2.domain.com/"
ProxyPassReverse "/subfolder" "https://subdomain2.domain.com/"
ProxyPass "/" "https://subdomain1.domain.com/"
ProxyPassReverse "/" "https://subdomain1.domain.com/"