![]() |
Incorrect home page link on Nav Bar
Hi,
I am getting an unexpected url when I click on my home page link from my navigation bar. All my other links work. When I click on my home page link, the following url presents itself and I get a page not found:- http://www.womansworld.com.au/dev/xcart//dev/xcart/ My .htaccess file has:- DirectoryIndex home.php My config.file has:- $xcart_web_dir ="/dev/xcart"; Here is my code in my head.tpl file. <div class="hnav"> <ul><li><a href="http://www.womansworld.com.au{$xcart_web_dir}/home.php">Home</a></li> <li><a href="http://www.womansworld.com.au{$xcart_web_dir}/help.php?section=contactus&mode=update">Contact Us</a></li> <li><a href="http://www.womansworld.com.au{$xcart_web_dir}/register.php">Register</a></li> <li><a href="http://www.womansworld.com.au{$xcart_web_dir}/help.php?section=login">My Account</a></li> </ul> </div> If someone wants to see this in action, here is the site:- http://www.womansworld.com.au/dev/xcart/home.php Does anyone know what has gone wrong? |
Re: Incorrect home page link on Nav Bar
http://www.womansworld.com.au/dev/xcart//dev/xcart/
I am guessing you have placed the wrong URL in your admin. Look at the 2 forward slashes after /xcart ( /xcart//dev/) Cheers |
Re: Incorrect home page link on Nav Bar
Hi Ozi,
Thanks for replying. I just looked at the xcart directory in the Summary section in Admin (I hope that is what you meant). My xcart directory under environment info is correct. I don't know what I have done to cause this. I click on the home link all the time and have never see this happen before. |
Re: Incorrect home page link on Nav Bar
have you checked your company settings page..
what's the url in the website address section? cheers |
Re: Incorrect home page link on Nav Bar
Yes I have checked this out. It is www.womansworld.com.au. The main thing I have been doing lately is creating a separate database for my live site because I was only dealing with one database whilst I was developing.
I am thinking really hard as to how this problem only affects the home page link and not any other link that I reference {$xcart_web_dir} with..... |
Re: Incorrect home page link on Nav Bar
It is clear that whatever you are using for your navbar has an extra / going on.
Are you using a navbar mod, or is the navbar code in your header template? Use "webmaster mode" and you'll have this solved in a minute or so. |
Re: Incorrect home page link on Nav Bar
Carp,
My nav bar code in my first post is all done by me. I don't believe Webmaster mode will help me solve this issue. This code is in my head.tpl file. I forgot to mention that I had CDSEO installed for me a few weeks back. That is the only major change apart from creating two separate databases. I will take a look at my files again to see if anything stands out. Regards, Kylie |
Re: Incorrect home page link on Nav Bar
Quote:
There you go. Try this: INSTEAD OF: Code:
<ul><li><a href="http://www.womansworld.com.au{$xcart_web_dir}/home.php">Home</a></li> Try: Code:
<ul><li><a href="/">Home</a></li> You do not need the full http:// in every navbar link. The other code is doing the work. |
Re: Incorrect home page link on Nav Bar
while you're at it -- cahnge these links too:
Code:
<li><a href="/help.php?section=contactus&mode=update">Contact Us</a></li> |
Re: Incorrect home page link on Nav Bar
Carp,
The reason why I didn't use a relative url is because my development database is two levels under my live site. I referenced it by {$xcart_web_dir} or rather I did when it worked before. Your suggested code takes me straight to my live site when I click on the home link. I tried this and it worked ok for my dev site although the only diff now is the full path is in variable instead of hard coded in the template. <li><a href="{$http_location}">Home</a></li> <li><a href="{$http_location}/help.php?section=contactus&mode=update">Contact Us</a></li> <li><a href="{$http_location}/register.php">Register</a></li> <li><a href="{$http_location}/help.php?section=login">My Account</a></li> |
Re: Incorrect home page link on Nav Bar
Update...
I have changed my nav code to look like this and all is good. <ul> <li><a href="home.php">Home</a></li> <li><a href="help.php?section=contactus&mode=update">Cont act Us</a></li> <li><a href="register.php">Register</a></li> <li><a href="help.php?section=login">My Account</a></li> </ul> I guess I need some sleep. |
All times are GMT -8. The time now is 01:59 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.