Submit Your Article Forum Rules

Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13

Thread: 301 redirect for home/index page

  1. #11
    Junior Member
    Join Date
    Sep 2006
    Posts
    26
    The problem is you have your entire store in the "catalog" folder. I assume you did this to try and retain the links when you moved from the html catalog to DSEFU.

    Instead, move it back to the root directory by doing the following:

    1. Log into your admin section and move your images location from the file system, to the database.

    2. Transfer all your files out of the "catalog" directory, into your root directory. Ensure there is no index.html in this root directory.

    3. Open config.php and find:

    Code:
    $xcart_web_dir ="/xcart";
    Remove /xcart so it looks like:

    Code:
    $xcart_web_dir ="";
    4. Log back into your admin section, and move your images location from the database back to the file system.

    Then redirect your old links using this code in an .htaccess file [will also ensure that your domain always uses the www] (substitute yourdomain.com):

    Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^yourdomain.com
    RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L]
    RewriteRule ^store/(.*)$ http://www.yourdomain.com/$1 [R=301,L]
    You also need to ensure that home.php is loaded when the domain is loaded, since there is no index.html, and as by default x-cart tries to do a redirect from index.php to home.php (which isn't even a 301 redirect). You can do this with this code in .htaccess:

    Code:
    DirectoryIndex home.php index.html index.php index.htm
    I'll address your ticket with us during business hours tomorrow.

  2. #12
    Senior Member bj's Avatar
    Join Date
    Apr 2005
    Posts
    1,171
    I admit to not being familiar with X-Cart, but most good quality carts have an rss feed of some sort. Rather than redirecting or changing things in a major way, with the possibility of a SERP drop, why don't you research a way to use magpie or one of the other rss tools to pull stuff from your cart into your static homepage? It would seem to give you the best of both worlds, since then it wouldn't require updating of the now not so static homepage, it would be refreshed automatically.

    And if you then need to run php code in your otherwise static homepage you'll also need to do some htaccess magic to allow php code to run in a file with an htm(l) extension so you don't change the filename (and take a SERP hit.)

    Anyway, it's just a thought.

  3. #13
    Senior Member Milo's Avatar
    Join Date
    Nov 2004
    Posts
    236

    301 homepage redirect

    O.K. I think the point here is its not advisable to redirect the index page to a dynamic page and get a better result. The X-cart issues are a side note, but thanks for all the help and input guys.
    Warm regards.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. What effects on SEO if home page Redirect to other page
    By online_pakistan in forum Search Engine Optimization Forum
    Replies: 4
    Last Post: 06-17-2009, 03:35 PM
  2. What is correct string for a .htaccess to redirect a page in Serps to Home Page
    By chirosche in forum Search Engine Optimization Forum
    Replies: 13
    Last Post: 04-14-2008, 04:57 AM
  3. Is this bad for SEO? header (redirect) on index page?
    By webdesignhq in forum Search Engine Optimization Forum
    Replies: 5
    Last Post: 08-28-2007, 04:58 PM
  4. 302 Redirect on home page
    By wmrobwl in forum Google Discussion Forum
    Replies: 4
    Last Post: 07-14-2006, 01:11 PM
  5. 302 redirect from link directory has hijacked my index page
    By sillykelly in forum Yahoo! Discussion Forum
    Replies: 0
    Last Post: 01-06-2005, 09:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •