I have installed CakePHP in my test server and it is working fine. When I moved the site to production server the site is not working. In routes.php I have this code
Router::connect('/', array('controller' => 'occasions', 'action' => 'index'));
It is loading when there is no controller name and action name in the url. If I add the contoller name and action name in url the page giving an 404 error, i.e. www.server.com/mycake is working fine,
but www.server.com/mycake/occasions/index giving 404 error. The mod_rewrite is on in the server. And also the js and css are not loading with this code:
echo $html->css(array('style'));
echo $javascript->link(array('common_functions','jquery.min'));
It sounds like your rewriting isn’t working properly.
/mycake will work fine because apache will redirect an base dir url to index.php, but url rewriting isn’t working.
Maybe (just a guess) you need to include
RewriteBase /mycakeor similar for it to work properly.