Wednesday, April 28, 2010

Re: Root prepended to the URL on shared host

Hi

Thanks for the reply.

Sorry yes that was a typo - should have been </a>.

However thats not the issue - I am using the html helper to generate
the link. When looking at the rendered html Cake is prepending the
app's root to the URL (as shown above). This also happens when using
the 'url' option in the form helper create action.

I think its a constant in the webroot/index.php file that needs
updating. I have never had this issue before either locally or on
dedicated hosting servers. This site is on a sharede host and wasnt
to sure if that was affecting it.

Has anyone had this issue before?

Many thanks

On Apr 27, 5:28 pm, dirk schut <dschut.ge...@gmail.com> wrote:
> Hi.
>
> First of all you had this peas of code:
> <a href="/websites/ ..../public_html/webroot/foo/bar">link</a
> and it need to be:
> <a href="/websites/ ..../public_html/webroot/foo/bar">link</a>
>
> Secondly I think you need to delete the /websites/ ..../public_html/ part
> out of your code. Hope it works.
>
> Dirk Schut.
>
> 2010/4/27 celery <mark-h...@mark-holt.co.uk>
>
>
>
> > Hi,
>
> > I am having probs with an app on shared hosting.  Everytime i try and
> > run a url through a cake helper it prepends the full root of the app
> > to it.
>
> > For example -
>
> > echo $html->link('link' ,'/foo/bar');
>
> > comes back as
>
> > <a href="/websites/ ..../public_html/webroot/foo/bar">link</a
>
> > Any ideas on why this may be? works fine locally.
>
> > Thanks for your help.
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.com>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: