Reputation: 4464
I believe this is very simple question. Maybe that's why I can't find it on Google.
When I do this inside View/Product/view.ctp
echo $this->Html->link('Download PDF', 'app/files/product/1/manual.pdf');
The resulting URL is like this:
app/products/app/files/product/1/manual.pdf
It automatically added app/products
since this is inside Product's view.
How to nullify that automatic addition?
Thanks
Upvotes: 0
Views: 69
Reputation: 29137
You're specifying a relative url, causing your browser to append the url to the current url.
echo $this->Html->link('Download PDF', '/app/files/product/1/manual.pdf');
(note the leading slash /
)
Should result in a link to http://example.com/app/files/product/1/manual.pdf
Upvotes: 3