title: How to redirect to an action in Magento?
body: <p>HI,</p>
  
  <p>I am trying to create a router for my custom module.</p>
  
  <p>I would like to access index controller's hotsale action by url/hotsale. So I create the following router xml in my module's config.xml.</p>
  
  <pre><code>&lt;hotsale&gt;
   &lt;use&gt;standard&lt;/use&gt;
   &lt;args&gt;
    &lt;module&gt;Moon_Products&lt;/module&gt;
    &lt;frontName&gt;hotsale&lt;/frontName&gt;
   &lt;/args&gt;
  &lt;/hotsale&gt;
  </code></pre>
  
  <p>when I access url/hotsale, it goes to index controller's index action. How do I make it to execute hotsale action?</p>
  
  <p>I tried to add hotsale, but it didn't work.</p>
  
  <p>I took Alan Storm's suggestion and ended with the following code.</p>
  
  <pre><code>public function indexAction()
  {
      if($this-&gt;getRequest()-&gt;getRouteName() == 'hotsale'){
  
          $this-&gt;loadLayout();    
  
          $block = $this-&gt;getLayout()-&gt;createBlock(
              'Mage_Core_Block_Template',
              'my_block_name_here',
              array('template' =&gt; 'moon/hotsale.phtml')
          );
  
  
          $this-&gt;getLayout()-&gt;getBlock('root')-&gt;setTemplate('page/product-without-rightbar.phtml');
          $this-&gt;getLayout()-&gt;getBlock('content')-&gt;append($block);
  
          $this-&gt;renderLayout();
  
      }
  }
  </code></pre>