D
D
dk-web2015-10-13 20:30:01
Yii
dk-web, 2015-10-13 20:30:01

How to properly implement paths in frameworks?

Friends, I'm sick of it....
I've already "made" a lot, but it's full of rubbish with paths... in all tutorials, lessons, manuals... paths start with /
/controller/action
asset(/css/admin.css)
for me, it immediately throws it to localhost ... and I have to configure everything manually ..
where am I doing something wrong? I'm already afraid to imagine what will happen when I start uploading to hosting ...
Almost everywhere they make a conditional site.local with ... vhost? it is necessary?
I now have localhost/mysite/public everywhere.....
Confused(

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivanq, 2015-10-13
@dk-web

With vhost required for normal debugging. / throws to the very root of the site, in your case to localhost. If you were to use VirtualHost with, say, mysite.localhost, you wouldn't have any problems.

S
Sergey Sergeev, 2015-10-23
@alokazay

Kind and you case not about it.: {{URL::to('/')}}? And the problem with the paths can be forgotten.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question