title: Magento 2.1.2 Rourter action factory gets in to an infinite loop
body: <p>I am working on developing a module in magento2.The problem is with the routing-where the router return $this->actionFactory->create('Magento\Framework\App\Action\Forward'); does not redirect to my module,contorller and the action specified in the code;it thorws an exception Front controller reached 100 router match iterations.Any help would be highly appreciated.Thanks in advance!</p>
  
  <pre><code>public function match(\Magento\Framework\App\RequestInterface $request)
      {  
  
   $identifier = trim($request-&gt;getPathInfo(), '/');   
  
      $condition = new \Magento\Framework\DataObject(['identifier' =&gt;   $identifier, 'continue' =&gt; true]);
      $this-&gt;eventManager-&gt;dispatch(
          'news_controller_router_match_before',
          ['router' =&gt; $this, 'condition' =&gt; $condition]
      );
  
      $identifier = $condition-&gt;getIdentifier();
  
      if ($condition-&gt;getRedirectUrl()) {
  
          $this-&gt;response-&gt;setRedirect($condition-&gt;getRedirectUrl());
          $request-&gt;setDispatched(true);
          return $this-&gt;actionFactory-&gt;create('Magento\Framework\App\Action\Redirect');
      }
  
      if (!$condition-&gt;getContinue()) {
          return null;
      }
  
      /*for main page */
      /*check identifier against news-configuration main page idendifier */
  
      //$mainIdentifier = $topic-&gt;getMainPageIdentifer();
       $mainIdentifier = 'news';
  
      if ($mainIdentifier == $identifier) {
  
          $request-&gt;setModuleName('news')-&gt;setControllerName('index')-&gt;setActionName('view');
           $request-&gt;setAlias(\Magento\Framework\Url::REWRITE_REQUEST_PATH_ALIAS, $identifier);
             return $this-&gt;actionFactory-&gt;create('Magento\Framework\App\Action\Forward');
      }   
  
  
  
  }
  </code></pre>
  
  <pre>
  1 exception(s):
  Exception #0 (LogicException): Front controller reached 100 router match iterations
  
  Exception #0 (LogicException): Front controller reached 100 router match iterations
  #0 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
  #1 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
  #2 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'requestPreproce...')
  #3 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
  #4 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
  #5 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
  #6 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
  #7 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
  #8 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
  #9 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
  #10 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
  #11 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
  #12 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(68): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
  #13 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
  #14 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
  #15 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
  #16 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
  #17 /opt/lampp/htdocs/Magento-CE-2.1.2_sample/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
  #18 {main}
  
  </pre>
  
  <p></p>