links not pointing to the right place

我的梦境 提交于 2019-12-11 23:35:45

问题


So im trying to build a link using cakephp, here is the code im using:

echo $this->Html->link('FAQs',array('controller' => 'faqs','action' => 'index','full_base' => false));

and the link path im getting back is:

http://mysite.co.uk/websites/123reg/LinuxPackage25/ho/me/tr/mysite.co.uk/public_html/faqs

Im using a linux based hosting.

Has anyone experienced this before? or is able to offer some help.

thanks


回答1:


First of all the problem isn't related to your use of full_base as it defaults to false anyway and should give you:

/faqs

The issue you seem to be having is that http://mysite.co.uk/ is not pointing to the root directory public_html. If you have acccess cPanel i.e. have login credentials for accessing your webhosting and root SSH access, have a look at this blog post and scroll down to Changing Primary domains:

http://blog.servint.net/2012/03/30/the-tech-bench-changing-a-document-root-in-cpanel/



来源:https://stackoverflow.com/questions/22731678/links-not-pointing-to-the-right-place

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!