I installed lampp recently in my linux machin, the sources files should be placed in /opt/lampp/htdocs directory which is annoying to work with... so what I did is creating a Symbolic link which point to that directory like that :
sudo ln -s /home/medBo/projects /opt/lampp/htdocs
Now I have my project in the following path : /home/medBo/projects/ecommerce/ and everything work fine
In a view I have a link like this :
<a href="/test/hello">click here</a>
what I expect from that link is to be pointed to localhost/projects/ecommerce/test/hello but when I hover the mouse over it or I click it, it send me to localhost/test/hello
Isn't localhost/projects/ecommerce/ considered as my site root ? what I can do about it ?
UPDATE :
Someone suggested in the comment to add <base herf="http://localhost/projects/ecommerce">
in the head of the page, well the issue with this is when I go to this url
localhost/projects/ecommerce/some-controller/some-action
and inside that page there is a link to /go-to-other-controller/other-action
The destination becomes localhost/projects/ecommerce/some-controller/some-action/go-to-other-controller/other-action