We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Image and js Path

Hi

I'm kind of new to phalcon and I have som e issues access the images/javascript that I put under PATH/public/img(js)/

everything is working fine accessing the "root" (domain.com/). But when I try to access a routed site the sites get very ugly:)

From the ngnix access log i see that the file /Teams/js/plugins.js where Teams is one of my controllers. This path does however not exsist. and the path should be /js/plugins.js.

How do you fix this? In phalcon settings or using ngnix redirect in some way?

Regards André

Maybe you have somwhere setted baseurl to /Teams ?



8.7k
Accepted
answer
edited Dec '15

Hi no i don't belive that since i have the same issue for all controllers.

I did however find how to use images using .volt syntax for images, styelsheets and javasacript https://docs.phalcon.io/en/latest/reference/tags.html#images

I just need to change all the standard HTML syntax to VOLT ones

And this is working :)