Cross domain request fix with rewrite question

Topics: Developer Forum
Nov 8, 2012 at 3:23 PM

Hello,

I am very new to IIRF, so please forgive the simple questions, however I must ask.  I am trying to resolve a cross domain request issue in IE 8 and 9.  I have a site with a domain name of maindomain.org.  I have a search feature on the site that uses another domain to make a request.  I want to do a rewrite of that subdomain.org url so that in my page for the search can use the same maindoamin.org.  Below is what I came up with but I am failing to get it to work and it is my lack of phrasing it correctly in the ini.  The filter in IIS did load so I know the install is good.

What I created:

RewriteCond %{HTTP_HOST} maindomain.org/search [I]
RewriteRule ^(.*)$ http://subdomain.org:8394/api/v10/search?collection=col_15440&query="+term+"&output=application/json  [U,L]

What I am trying to accomplish is having all URL's use the http://maindomain.org/........ and if the /serach is used to have it continue to the subdomain but keep the main domain in the ref url.  The /search does not exist on the IIS web server as I just want it to use the subdomain url to fulfill the request.

 

My apologies for asking this it must be a simple solution and I am missing it.