This is my custom module url http://192.168.1.18/upload/index.php/capsync/
I want to call the next action from the controller apiaction
with this:
http://192.168.1.18/upload/index.php/capsync/index/api
but remove index
in the url:
http://192.168.1.18/upload/index.php/capsync/api
My config.xml page
<rewrite>
<Livelids_Capsync>
<from><![CDATA[#^capsync/index/api/#]]></from>
<to><![CDATA[api]]></to>
<complete>1</complete>
</Livelids_Capsync>
</rewrite>
In Magento, router will parse your URL as follows: http://yoursite.com/[frontName]/[actionControllerName]/[actionMethod]/
In your case, For URL : http://192.168.1.18/upload/index.php/capsync/index/api
frontName :: capsync
actionControllerName :: indexController
actionMethod :: apiAction
Above is exactly what you want that is next action in the controller which would be 'apiAction'
Similarly, if you want URL : http://192.168.1.18/upload/index.php/capsync/api
Then your actionControllerName will turn to another controller(apiController) & action(indexAction by default) altogether which is what I don't think you want.
Let me know if you don't get this. Thanks! :)