链接未指向正确的位置 [英] links not pointing to the right place
问题描述
所以我正在尝试使用cakephp建立链接,这是我正在使用的代码:
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));
echo $this->Html->link('FAQs',array('controller' => 'faqs','action' => 'index','full_base' => false));
且链接路径返回是:
http://mysite.co.uk/websites/123reg/LinuxPackage25/ho/me/tr/mysite.co.uk/public_html/faqs
我使用的是基于Linux的托管服务。
Im using a linux based hosting.
有人曾经经历过吗?或能够提供一些帮助。
Has anyone experienced this before? or is able to offer some help.
谢谢
推荐答案
第一个所有问题均与您使用full_base无关,因为它无论如何都会默认为false并应为您提供:
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
您似乎遇到的问题是 http://mysite.co.uk/ 未指向根目录 public_html 。如果您具有cPanel权限,即拥有用于访问您的网络托管和root SSH访问权限的登录凭据,请查看此博客文章,然后向下滚动至更改主域:
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/
这篇关于链接未指向正确的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!