nezona Posted December 8, 2007 Share Posted December 8, 2007 I have this piece of code in my header.php ;- <a href="<? echo SITE_URL; ?>reception/" class="snav" >Reception Areas</a> Now obviously this points to a page on my site called reception. The only problem is im trying to get ready to be search engine optimized, instead of it pointing to the whole of the url, I just want it point to same site link i.e instead of www.primeofficeenviroments.com/reception. I want it to point to /reception. Can anyone help? Neil Quote Link to comment Share on other sites More sharing options...
ILYAS415 Posted December 8, 2007 Share Posted December 8, 2007 Lol. I think i no wat ur talking about but why don't you just get rid of <? echo SITE_URL; ?>? At the moment ur outputting your a href link as www.website.com/reception however if u just use... <a href="reception/" class=snav>Reception areas</a> it'll work fine Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted December 8, 2007 Share Posted December 8, 2007 use ./reception/ instead. the ./ means from the current (working) directory (or cwd for short) NOTE: ./ will work if your url is wwwmysite.com as the browser will read reception/ from wwwmysite.com/reception/ However if your url is this: wwwmysite.com/dir2/ then the browser will read reception/ from wwwmysite.com/dir2/reception/. As dir2/ is the cwd. Instead you should use ./../reception/. The ../ means backup one level in the directory tree. Quote Link to comment Share on other sites More sharing options...
nezona Posted December 8, 2007 Author Share Posted December 8, 2007 Hi thanks guys it worked, apart from.... because it's the header.php file, if I go from the home pages www.primeoe.com and click on the a href is works fine and shows the directory www.primeoe.com/reception. If I then click on desks it tries to find www.primeoe.com/reception/desks. is there anywhere around this? kind regards neil Quote Link to comment Share on other sites More sharing options...
jacksonmj Posted December 8, 2007 Share Posted December 8, 2007 Use /reception/ / at the start of a URL means that it is relative to the directory root, which in a web browser is the current domain name. Quote Link to comment 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.