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)
-   -   home.php to index.php (https://forum.x-cart.com/showthread.php?t=32585)

vtonya 07-16-2007 07:05 AM

home.php to index.php
 
Dear friends,

Does anybody know how can i make my home.php file to be index.php?

Now i'm using redirection from index.php to home.php, but as i know that is not very good for SEO.

Please, advise

balinor 07-16-2007 07:59 AM

Re: home.php to index.php
 
You don't need to redirect anything, just add this to your .htaccess file:

DirectoryIndex home.php

vtonya 07-16-2007 08:21 AM

Re: home.php to index.php
 
balinor, as always, you heped me very much

Thanks a lot!

kevuk 02-29-2008 12:48 AM

Re: home.php to index.php
 
How does that work for windows?

balinor 02-29-2008 04:14 AM

Re: home.php to index.php
 
It doesn't.

activeabrasives 03-12-2008 05:33 PM

Re: home.php to index.php
 
We have launched our new website in the last couple of weeks, and got some feedback from prospective customers that they don't like having the "Enter the Store" page, and wish to be able to access our website without this page.

We have noted a posting in the forum which said to just remove the index.html page, and make sure you set

Code:
DirectoryIndex index.html index.php

in your .htaccess file. This way the front page of your store comes up automatically without the welcome page.

This is what we want to do, but we now have removed the index.html from the static pages section, and now are getting some errors with trying to access our store.

We are not very familiar with FTP, etc., and wonder what is the easiest way to get to the .htaccess file. Can we do this through X-cart itself in the Admin mode?

balinor 03-12-2008 05:35 PM

Re: home.php to index.php
 
Afraid not, you need to use FTP or your hosting control panel, as the file is outside of your X-Cart file admin. And the correct .htaccess would be:

DirectoryIndex home.php

kube 03-12-2008 05:36 PM

Re: home.php to index.php
 
It might have something to do with having a Zeus server, possibly?

activeabrasives 03-12-2008 05:40 PM

Re: home.php to index.php
 
So, should we get in contact with the company that hosts our website?

Would that be the easiest course of action, if we are not fluent with FTP. I am not sure where to look in the FTP.

balinor 03-13-2008 03:34 AM

Re: home.php to index.php
 
Well, you kind of need to know FTP to maintain your site, so it will be worth your time to learn the basics. A good FTP client is Cute FTP, but there are many available. The .htaccess file is in your main root directory.

amadecs 03-16-2008 04:08 PM

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.

balinor 03-16-2008 04:10 PM

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.

billstevens 03-18-2008 09:18 AM

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

balinor 03-18-2008 09:19 AM

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?

billstevens 03-18-2008 10:29 AM

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?

balinor 03-18-2008 10:47 AM

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.

billstevens 03-18-2008 03:29 PM

Re: home.php to index.php
 
Thanks for the input. That's just the nudge I needed to make the change ;)

yages 03-24-2008 12:54 PM

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

balinor 03-24-2008 01:18 PM

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.

amadecs 03-28-2008 11:28 AM

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!

Learner 06-29-2009 04:31 AM

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.


Balinor,
I have changed my htaccess file from DirectoryIndex index.html index.php to DirectoryIndex home.php but again my site redirects to www.mydomain.com/home.php

I need my site redirects to mydomain.com only.

Can you guide me? Thank you.

sinobest 11-25-2009 04:01 PM

Re: home.php to index.php
 
any good idea?

Jon 11-25-2009 07:53 PM

Re: home.php to index.php
 
Here's a tutorial to move your site to root and maintain search engine rankings: Move X-Cart To Root.

If you don't move your site to root, then at least set a home.php directory index in your subfolder .htaccess file do a 301 redirect from root to your subfolder by putting an index.php file in root with the following content (replace /shop/ with your folder):

Code:

<?php
header('Location: /shop/',TRUE,301);
?>


Our CDSEO program includes a home.php directory index and to consolidate pages it also does a 301 redirect to / when http://www.example.com/home.php is accessed directly.

If you are running Zeus then you can set your directory index in your control panel.

Jon 11-25-2009 07:54 PM

Re: home.php to index.php
 
You should also specify if your domain uses www. or not, here's another tutorial: http://www.x-cart-seo.com/x-cart-seo-blog/www-seo-pick-a-domain-preference/


All times are GMT -8. The time now is 06:31 PM.

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