Routes with apache

I have developed an application and it works fine under webrick, but
when I change to Apache I have problems with the routes.
I access the files in my public directory in webrick with
“public/images/something” and in Apache I get an “No such file or
directory” and I have to change all the routes from
“public/images/something” to “images/something” and it works, does
anyone know how to avoid this.
thank you in advance