Redirect and rewrite to another server

ibrahim alsadhan asked on January 10, 2019 12:44

Hi all,

my problem that I have online kentico website . and it have domain name . and now i have new project on new server with new public IP without domain name .

IS it possible to make my domain redirect and rewrite my url

for example :

www.example.com ( kentico website ) publicIP/website ( my new website )

www.example.com/website ( will be redirect and rewrite URL to that server)

Note these two server not in same place at all two different environment

Recent Answers


David te Kloese answered on January 10, 2019 14:04

I'd use IIS rewrite module. https://docs.microsoft.com/en-us/iis/configuration/system.webserver/httpredirect/

Not tested but you'll end up with something like

<rule name="redirect" enabled="true" stopProcessing="false">
   <match url="(.*)" />
   <conditions>
      <add input="{HTTP_HOST}" pattern="example.com" />
   </conditions>
   <action type="Redirect" url="http://127.0.0.1/{R:1}" redirectType="Permanent" />
</rule>
0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.