0
votes

I create a Zend project. My images are in folder public/icons and they available when I run project using url http://localhost/zendproject/public/icons/image.png but when I use virtualhost http://zend.gameblog I can't get this image by url http://zendgameblog/icons/image.png. Browser says "403 Forbidden" and I can't understand why. I also have public/captcha folder and any image from this location always available by url http://zend.gameblog/captcha/image.png.

I use: win7 x86, WAMP, zend framework 1.12, Zend Studio 9.0.4. Some of resources and folders I created manually not via Zend Studio.

Please help me and tell whether I will have such problems when I'll run my project at real server?

1
Check permission of the project and images folder. - tasmaniski

1 Answers

0
votes

For all css, js and img on web site use baseUrl helper:

$this->baseUrl('/icons/image.png');
//or
$this->baseUrl('/css/css_file.css');

and for all links on web site use URL View Helper: $this->url(...)