I have one portal like www.mywebsite.com and it has one module like booking. Current flow in url is that www.mywebsite.com/booking/. This is fine for current situation but we are moving to high volume traffic and want to divide it to multiple part with country and region wise and host booking module to multiple servers.
Now my question is that we can url rewrite in main website like,
www.mywebsite.com/us-ny-booking/ to booking-us-ny.mywebsite.com ( is hosted on different server ).
Is this working or not ?
You probably could go with something like:
<rewrite>
<rules>
<rule name="My redirect" stopProcessing="true">
<match url="^(abc|pqr)/?(.*)?$" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(abc|pqr)\.mywebsite\.com$" negate="true" />
</conditions>
<action type="Redirect" url="http://{R:1}.mywebsite.com/{R:2}" />
</rule>
</rules>
</rewrite>
What it does:
abc
or pqr
abc
or pqr
abc.mywebsite.com/whatever
or pqr.mywebsite.com/whatever
depending on the original request
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.