php - CakePHP Routing Problem -
I have encountered the KPHP root problem. I can only use the "" " / " root and this CakePHP default shows the welcome homepage. Later I write my controller (icons_controller.php) and view (view / icon / index.ctp) I try it, there is a problem in it. I've typed in http: // localhost: 8080 / myapp / icons / , it always says " not found the requested URL / myapp / icons / was not found on this server. "My router.ff file contains:
router :: connect ('/', array ('controller' => page ',' verb '=' Router :: connect ('/ pages / *', array ('controller' => gtk; page ',' verb '=>' display ')) ; I will create a controller in the icons_controller.php file:
set (' symbol ', $ this-> symbol-> search (' all '));}}? and file this Only one paragraph tag should be opened in the text (/views/icons/index.ctp).
my symbol But I can not open index.ctp using localhost: 8080 / myapp / icons / . Then later I try to modify my routers.php file like this The URL works fine with the router:: connect ('/', 'array' ('/', 'url', 'url http: // localhost: 8080 / myapp / :
This is fine and success displays "My icons" text, it is surprising that why works under "/" and nothing works.
Check to make sure that you have enabled mod_rewrite on Apache.
Comments
Post a Comment