CakePHP without htaccess and mod_rewrite - how to overwrite WEB URL PATH
So I installed CakePHP on a IIS box and followed the steps of uncommenting the appropriate lines in core.php to make my URLs work as index.php/controllername/methodname/
My only problem now is that all the convenience functions such as $html->css, $html->link, etc. are pointing to some wacky paths. If I am viewing index.php/pages/home开发者_开发问答 doing $html->link('Test', '/pages/test') produces a link to index.php/pages/pages/test/
How do I fix this?
I had a similar problem with my plugin paths and I posted a ticket.
Try to insert ../../
at the beginning of the path.
$html->css('../../your_style_sheet');
For the links use this syntax:
$html->link('Test', array('controller'=>'pages', 'action'=>'test'));
精彩评论