-1

Wondering how to redirect subdomain public html directory to external server pu lic html directory? E.g

When user comes to this link: Sub.domain.com/abc

Contents of abc would get displayed from another external server html directory.

Edit:

Os -- ubuntu Environment-- vps

Sub.domain.com/abc ----> server1 Sub.domain.com/efg ----> server1 Sub.domain.com/xyz ----> server2

Do i need to point both server ip addr to same subdomain? Do i need to define subdomain in both servers

In short what i suppose to do:)

1 Answers1

0

One way is to simply redirect with an .htaccess file, assuming you are using apache:

RewriteEngine on
RewriteCond %{REQUEST_URI} ^sub.domain.com/abc [NC]
RewriteRule ^(.*)$ http://external.org/ [R=301,L]

However, for this question to be more thoroughly answered, please provide more detail, such as OS, server, etc