title: React router consume my url request to back-end API
body: <p>I'm building an SPA react-redux app at client-side, asp.net core back-end API.
  Everythings run perfectly with IISExpress when debugging.
  But when I deploy to IIS as a web application nested default website with the alias "mysubdomain". Everything still runs ok except export function.</p>
  
  <p>(1st case): Open browser, enter download API link: <a href="http://localhost/mysubdomain/api/v1/export?filterparam" rel="nofollow noreferrer">http://localhost/mysubdomain/api/v1/export?filterparam</a>. A save dialogue open. That was my expectation.</p>
  
  <p>(2nd case: normal case): open my site (homepage): <a href="http://localhost/mysubdomain" rel="nofollow noreferrer">http://localhost/mysubdomain</a> then click export, a new window open by the link:
  <a href="http://localhost/mysubdomain/api/v1/export?filterparam" rel="nofollow noreferrer">http://localhost/mysubdomain/api/v1/export?filterparam</a>.
  I was expecting that savefile popup opening similar to (1st case) but <strong>NO</strong>. Browse return my <strong>components/Layout</strong> rendered. </p>
  
  <p>I don't know what happening with react router/route? Or I make something wrong? I guess that react-router just consume my URL-request then render my Component, instead of call to my back-end API.</p>
  
  <p>My export function inside redux store:</p>
  
  <pre><code>export: (filterParams) =&gt; async (dispatch, getState) =&gt; {
        const url = `api/v1/export?${filterParams}`;
        window.open(url,'_blank');
    }
  </code></pre>
  
  <p>Back-end API:</p>
  
  <pre><code>[HttpGet]
  [Route("download")]
  public async Task&lt;IActionResult&gt; Download(DailyDischargeUrlQuery urlQuery)
  {
    var stream = await _dailyDischargeRepository.ExportAsCsvStream(urlQuery.DischargeDate, urlQuery.MRN, urlQuery.GetCompanies(), urlQuery.GetOrders());
  
    return File(stream, "text/csv", "dailydischarge.csv");
  }
  </code></pre>
  
  <p>index.js</p>
  
  <pre><code>const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href');
  const history = createBrowserHistory({ basename: baseUrl });
  const initialState = window.initialReduxState;
  const store = configureStore(history, initialState);    
  const rootElement = document.getElementById('root');
  
  ReactDOM.render(
    &lt;Provider store={store}&gt;
      &lt;ConnectedRouter history={history}&gt;
        &lt;App /&gt;
      &lt;/ConnectedRouter&gt;
    &lt;/Provider&gt;,
    rootElement);
  
  registerServiceWorker();
  </code></pre>
  
  <p>App.js</p>
  
  <pre><code>import 'core-js';
  import React from 'react';
  import {Route, Router} from 'react-router';
  import Layout from './components/Layout';
  import Home from './components/Home';
  
  export default () =&gt; (
      &lt;Layout&gt;
          &lt;Route exact path='/' component={Home}/&gt;
      &lt;/Layout&gt;
  );
  </code></pre>