0

I have two sites:
http://blog.site.com and http://www.site.com

Both sites are on different servers and different IP addresses (different hosting providers).

I would like to create rule which helps to rewrite the page

The URL will look like http://www.site.com/logs/current_pages/ to the site visitor but it will really hit http://blog.site.com/logs/current_pages/

Is it possible?

Please check this, it is not working

<rule name="cname domain">
      <match url="/logs/(.+)" />
      <action type="Rewrite" url="http://blog.site.com{R:0}" appendQueryString="false" />
    </rule>
Maddy
  • 907
  • 3
  • 10
  • 25
  • [Yes](http://stackoverflow.com/questions/14269149/rewrite-subfolder-to-subdomain-in-web-config), it is [possible](http://stackoverflow.com/questions/15248094/how-to-rewrite-url-as-subdomain-in-asp-net-without-actually-creating-a-subdomain) – cheesemacfly May 30 '13 at 21:17
  • sorry, there was a typo. It is not working – Maddy May 31 '13 at 14:00
  • Ok, so you are probably missing a `/` in: `url="http://blog.site.com{R:0}"`. It should be `url="http://blog.site.com/{R:0}"` – cheesemacfly May 31 '13 at 14:10
  • ever this is not working – Maddy May 31 '13 at 14:40
  • As a test can you change `type="Rewrite"` to `type="Redirect"` and see if it goes where it should? – cheesemacfly May 31 '13 at 14:41
  • yes redirect is working fine but not rewrite – Maddy May 31 '13 at 14:48
  • Do you have the [Application Request Routing module](http://www.iis.net/downloads/microsoft/application-request-routing) installed and setup with the proxy mode enabled? – cheesemacfly May 31 '13 at 14:50
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/30993/discussion-between-abhi-shah-and-cheesemacfly) – Maddy May 31 '13 at 15:03

0 Answers0