5

This site was copied to a new domain when it started breaking. Is there some setting somewhere I need to update, so it knows how to build working URLs again?

1
  • did you try to clear the cache?
    – Kgaut
    Aug 18, 2011 at 19:12

1 Answer 1

10

Pass node/16, instead of /node/16.

The API reference for l() tells you that the $path argument is passed to the url() function. url() considers "/node/16" as a full URL (although the term "full URL" is not formally defined).

2
  • Huh you're right. I was using the node->path field. I changed to using node->nid and just concatenating node/ to it when I build the link.
    – Joren
    Aug 18, 2011 at 20:47
  • the node->path shouldnt contain a leading slash either.
    – user49
    Nov 4, 2011 at 4:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.