I have got this link echoed in php:
echo "<a href='$appUrl' class='link-wrapper'></a>";
$appUrl gives me this:
http://example.com/cams2/cam3
I am at url before clicking the link:
http://example.com/cams1
The links html is this:
<a href="cams2/cam3/" class="link-wrapper"></a>
When I click the url..I get this
http://example.com/cams1/cams2/cam3
Why are the 2 suburls..are added to the url..why not a new link is generated. like this:
http://example.com/cams2/cam3 ?
Is it the way browsers behave? can it be htaccess fault..? I dont think that it is..cause when I hover over the link, I see this :http://example.com/cams1/cams2/cam3.. even though what is represented is:
http://example.com/cams2/cam3
Any idea to why this happens?
update
solved.. I did this:
http://www.example.com/cams2/cam3
That solved the problem..I suspect it was some htaccess problem..no idea why it works
It’s relative path. It will redirect from present url. You need to write
/url/url2/. It is called absolute path. It will redirect from roothttp://example.com.