当前位置: 动力学知识库 > 问答 > 编程问答 >

Cakephp in subdirectory and hyperlinks

问题描述:

Ive installed cakephp at my domain (non root folder) and its working perfect but i see its generating all hyperlinks as [http://www.mysite.com/mywebsite/anypage] .

Any idea how to force it to not generate such and instead just point to desired section as if it were on root?

I believe others have asked about this without any luck in the past, i do hope a solution can come up this time :)

Resuming: Index.php is generating

<a href= directory/page.php>

and i would like to have it

<a href= page.php>

thank you

网友答案:

Use html helper for generating urls. $this->webroot can also be helpful http://book.cakephp.org/2.0/en/core-libraries/helpers/html.html#HtmlHelper::url

分享给朋友:
您可能感兴趣的文章:
随机阅读: