X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Converting all that links to "home.php" to the plain URL (https://forum.x-cart.com/showthread.php?t=29859)

Wallace 03-21-2007 12:55 AM

Converting all that links to "home.php" to the plain URL
 
Hi all,


I've made a little research on the problem of changing links to "home.php" to the plain URL (http://www.mysite.com) for SEO sake. I found a few threads, mostly answered by balinor. It seems that in a site that hasn't been throughoutly modified the link to home.php would appear in three places:

1. The logo on the top (that can be mended by changing the .htaccess or by doing this.

2. The "Home" link in the speed bar on the top, which can be changed by going to admin > administration > speed bar

3. The hierachy navigation over the middle column on the store, which is located on the "location.tpl".

However, I can't find a way to change the link to that points to "home.php" to "http://www.mysite.com" in "location.tpl". I don't want to remove it as it has been done by him.

Any suggestions?

hooter 03-21-2007 08:13 AM

Re: Converting all that links to "home.php" to the plain URL
 
Wallace,

Open your /skin1/location.tpl and find this line:
Code:

{if $location[position].1 ne "" }<A href="{$location[position].1}" class="NavigationPath">{/if}
and change to this:
Code:

{if $location[position].1 ne "" }{if $location[position].0 ne $config.Company.company_name}<a href="{$location[position].1}" class="NavigationPath">{else}<a href="{$http_location}/" class="NavigationPath">{/if}{/if}

Quote:

Originally Posted by Wallace
However, I can't find a way to change the link to that points to "home.php" to "http://www.mysite.com" in "location.tpl". I don't want to remove it as it has been done by him.

Any suggestions?


carpeperdiem 03-21-2007 12:13 PM

Re: Converting all that links to "home.php" to the plain URL
 
Why not use .htaccess, route you store to the root (that is, to home.php), and use "/" for the store location.

DO NO use "/home.php" or "/xcart/home.php" or any other variation.

Just make "/" your root.

Wallace 03-22-2007 12:46 AM

Re: Converting all that links to "home.php" to the plain URL
 
Hi rooter,

Thank you so much, it worked like a charm! :D/

carpeperdiem,

The .htaccess was already set to call "/" as root. Why it behaved like that, in spite of the change is a mystery to me...

carpeperdiem 03-22-2007 03:40 AM

Re: Converting all that links to "home.php" to the plain URL
 
Quote:

The .htaccess was already set to call "/" as root.

Another thing tha you may to be certian of (for SEO especially):

Everywhere there is a call to your home page (such as your header image, or speedbar, or a redirect) make sure it is ONLY "/". I have seen some storese where the redirect was set correct (smarty) but hard coded links to /home.php were abundant. Just something to watch out for. No need to give google a reason to call your home page duplicate content, just because there are 2 unique links to it.

Wallace 03-22-2007 05:44 AM

Re: Converting all that links to "home.php" to the plain URL
 
Thanks for the tip carpeperdiem, have changed the absolute link in the speedbar to only "/". As for the header image, it's been pointing to the root since we changed the .htaccess.

I'll keep a note on the "/". Hopefully other people will find this thread useful for their SEO.

MarkH 03-22-2007 06:52 AM

Re: Converting all that links to "home.php" to the plain URL
 
That change for the location can be made in the auth.php

My code as follows for 4.0.x

Code:

$location[] = array("home", "http://www.tommeetippee.co.uk");

Change the URI according to where you want the link to go to from the location link.

Cheers,

Mark


All times are GMT -8. The time now is 06:53 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.