A
A
Alionides2022-03-22 20:52:51
Domain Name System
Alionides, 2022-03-22 20:52:51

How to redirect different domains to site.com/sitename?

I wonder how site builders redirect from the domain to their dynamic URLs for their local sites. for example I have 2 domains and I want to register ns of my site builder names so that they redirect to the correct urls generated by the site builder. let's say I have site1.com and site2.com and I want to redirect them to sitebuilder.com/site1 and sitebuilder.com/site2, how to solve it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Drno, 2022-03-22
@Drno

nginx proxy + own DNS server

V
Viktor Taran, 2022-03-23
@shambler81

RewriteCond %{HTTP_HOST} ^(www\.|)(.+)\.site\.com [NC]
RewriteRule ^(.*)$ https://sitebuilder.com/%2/$1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question