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

home.php to index.php

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 03-16-2008, 04:08 PM
 
amadecs amadecs is offline
 

Member
  
Join Date: Jan 2008
Posts: 20
 

Default Re: home.php to index.php

I'm wondering how to get rid of the "home.php"

Does anyone know how I would do that. So instead of a visitor landing on:
www*widgets*com/home.php, they would just end up at www*widgets*com.
__________________
X-Cart: Version 4.1.9
Apache: Version 1.3.39 (Unix)
PHP: Version 5.2.4
Reply With Quote
  #12  
Old 03-16-2008, 04:10 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: home.php to index.php

If you have DirectoryIndex home.php in your htaccess file and type in yourdomain.com, it should just show yourdomain.com without the home.php.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #13  
Old 03-18-2008, 09:18 AM
 
billstevens billstevens is offline
 

Member
  
Join Date: Oct 2004
Posts: 26
 

Default Re: home.php to index.php

Our cart resides in /shop instead of our root html directory

What is the proper way to re-direct traffic to /shop/home.php without compromising SEO and without using an index.html landing page?

1) In .htaccess can I use directoryIndex shop/home.php
2) Use an index.php in our root folder that redirects to shop/home.php (or is this just as bad as a meta redirect from an index.html file?
3) Other options that I should consider?

Thanks in advance for any feedback.
-Bill
__________________
Bill
X-Cart 4.1.9
Reply With Quote
  #14  
Old 03-18-2008, 09:19 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: home.php to index.php

There really isn't a 'good' way to have the site in a sub-folder at all. The ideal setup is to move the site to the root. Is there a reason you can't do that?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #15  
Old 03-18-2008, 10:29 AM
 
billstevens billstevens is offline
 

Member
  
Join Date: Oct 2004
Posts: 26
 

Default Re: home.php to index.php

balinor,

Thank you for your reply

I guess I can do that... The site has been live a while and I just started trying some SEO using DSEFU and the XML sitemap... I was just worried about loosing existing links to web content. What your saying is that in the long run its gonna be better to just put the cart in the root location right?
__________________
Bill
X-Cart 4.1.9
Reply With Quote
  #16  
Old 03-18-2008, 10:47 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: home.php to index.php

Yes, particularly now that you changed the urls with DSEFU, it is a great time to move the site to the root. Just use mod_rewrite to redirect all traffic from the subfolder to the root and you won't lose anything.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #17  
Old 03-18-2008, 03:29 PM
 
billstevens billstevens is offline
 

Member
  
Join Date: Oct 2004
Posts: 26
 

Default Re: home.php to index.php

Thanks for the input. That's just the nudge I needed to make the change
__________________
Bill
X-Cart 4.1.9
Reply With Quote
  #18  
Old 03-24-2008, 12:54 PM
 
yages yages is offline
 

eXpert
  
Join Date: Sep 2004
Location: Australia
Posts: 332
 

Default Re: home.php to index.php

I do not wish to transfer my site to root directory as I will loose page ranking
Can I use this in the htaccess file to redirect to xcart folder

DirectoryIndex index.php /xcart/index.php
__________________
yages
x-cart version 4.5.5
Reply With Quote
  #19  
Old 03-24-2008, 01:18 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: home.php to index.php

Trust me, you DO want to transfer it to the root. If you properly redirect from the xcart/ folder to the root, you won't lose ranking, and will benefit from having it out of the root. I've been doing this a long time, the site in the root, even if you have had it in a sub-directory for a long time is a change you definitely want to make.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #20  
Old 03-28-2008, 11:28 AM
 
amadecs amadecs is offline
 

Member
  
Join Date: Jan 2008
Posts: 20
 

Default Re: home.php to index.php

Quote:
Originally Posted by balinor
If you have DirectoryIndex home.php in your htaccess file and type in yourdomain.com, it should just show yourdomain.com without the home.php.

Just another quick question. I noticed that changing the DirectoryIndex to home.php works, but I notice that the original URL with "home.php" attachment still exists.

Example:

http://www.expresscomputersystems.com/

www*expresscomputersystems*com/home.php

Where would be the best place to redirect without causing a loop?

Thanks!
__________________
X-Cart: Version 4.1.9
Apache: Version 1.3.39 (Unix)
PHP: Version 5.2.4
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 04:40 AM.

   

 
X-Cart forums © 2001-2020