Urlmanager Rules With Hostnames

I have two apps, one with the following url rule











    -- ignore the - in ht-tp://, i cant post links --

with this rule, url such as "company.localhost.com/controller/action" passes "company" to GET variable.

  1. Do i need the rules at the bottom? app works without them.

My second app is located in a sub-folder of the first app, i modified the rule to accommodate for the sub-folder and nothing gets passed to GET. this is how i modified it.





  1. How do i fix this rule to work from the sub folder.