Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

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

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-21-2007, 12:55 AM
 
Wallace Wallace is offline
 

Member
  
Join Date: Jan 2007
Posts: 26
 

Question 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?
__________________
Version 4.1.5
Reply With Quote
  #2  
Old 03-21-2007, 08:13 AM
 
hooter hooter is offline
 

X-Adept
  
Join Date: Dec 2004
Posts: 519
 

Default 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?
__________________
Blog for X-Cart | Ebay Auction Manager
Reply With Quote
  #3  
Old 03-21-2007, 12:13 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #4  
Old 03-22-2007, 12:46 AM
 
Wallace Wallace is offline
 

Member
  
Join Date: Jan 2007
Posts: 26
 

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

Hi rooter,

Thank you so much, it worked like a charm!

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...
__________________
Version 4.1.5
Reply With Quote
  #5  
Old 03-22-2007, 03:40 AM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default 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.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #6  
Old 03-22-2007, 05:44 AM
 
Wallace Wallace is offline
 

Member
  
Join Date: Jan 2007
Posts: 26
 

Default 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.
__________________
Version 4.1.5
Reply With Quote
  #7  
Old 03-22-2007, 06:52 AM
  MarkH's Avatar 
MarkH MarkH is offline
 

Senior Member
  
Join Date: Mar 2007
Location: Newcastle, United Kingdom
Posts: 166
 

Default 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
__________________
Web Development Manager / Security
X-Cart 4.0.13 + Customisations
Payment Card Industry Compliant Web Site

WWW: http://www.tommeetippee.co.uk/
MSN: info@voxia.co.uk
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:57 PM.

   

 
X-Cart forums © 2001-2020