narjis Posted October 16, 2012 Share Posted October 16, 2012 i am trying to link a url to one of my controller from the top menu but each time it is appending the controller in the url. here is the code of my header.php <nav class="main-navigation clearfix span12" role="navigation"> <h3 class="assistive-text">Main menu</h3> <ul> <li class="current"><a href="index.html">Home</a></li> <li> <a href="blog/about">About</a> <ul class="sub-menu"> <li><a href="#">Subpage</a></li> <li><a href="#">Subpage 2</a></li> </ul> </li> <li><a href="contact.html">Contact</a></li> </ul> </nav> on clickng the About link the url keeps on extendig blog/blog/blog....../about. How to resolve this issue. Quote Link to comment https://forums.phpfreaks.com/topic/269525-link-appending-on-each-click/ Share on other sites More sharing options...
trq Posted October 16, 2012 Share Posted October 16, 2012 The code you have posted does not do what you describe, nor is it php. Why have you posted in the Application Frameworks section? Care to provide more information? Quote Link to comment https://forums.phpfreaks.com/topic/269525-link-appending-on-each-click/#findComment-1385497 Share on other sites More sharing options...
ManiacDan Posted October 16, 2012 Share Posted October 16, 2012 Start your hrefs with a slash: href="/blog/about" Quote Link to comment https://forums.phpfreaks.com/topic/269525-link-appending-on-each-click/#findComment-1385508 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.