php - Relative URLs not Working Properly -


i working on application in having problem in writing relative urls.

the issue is,

suppose, url localhost/my-site/

now want url on tag <a href="category">category</a>. result in proper url localhost/my-site/category in address bar.

but, if current url localhost/my-site/category & want tag <a href="category/subcategory">subcategory</a>, resulting url localhost/my-site/category/category/subcategory in address bar.

so, doing is,

<a href="localhost/my-site/category">category</a> <a href="localhost/my-site/category/subcategory">subcategory</a> 

i don't want this. please help.


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -