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

Splash Page Alternatives

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #41  
Old 02-23-2005, 11:14 PM
 
Danielle Danielle is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 138
 

Default

OK, I deleted my index.html and my index.php files. Now weirdly enough, when I type in my address, my index page still comes up. How is that possible when the html code for it no longer exists? I totally deleted it...I'm so confused lol!
__________________
Danielle
X-Cart Pro 4.0.10
X-Gift-Registry
X-AOM
Reply With Quote
  #42  
Old 02-28-2005, 11:50 AM
 
bsinger bsinger is offline
 

Member
  
Join Date: Sep 2004
Posts: 14
 

Default

Here is a solution I have found works perfectly. I think it is good to the search engines because they dont respond to javascript.. but I am not sure. I still have my index page with links to the store, to redirect search engines. Again, not sure if it matters...

</HEAD>
<SCRIPT LANGUAGE="javascript">
<!--
window.location.href="index.php";
//-->
</SCRIPT>

Thats all I do. Its in my 404 pages as well. Its pretty transparent I think and so far everyone seems to be redirected without a hitch.

you can see it in action (or not see it as the case may be) at www.obsusa.com/store/index.html
__________________
http://www.obsstore.com
XCart Gold 4.1.10
Apache
PHP Version 4.3.4
MySQL server 4.0.20-standard
MySQL client 3.23.49
Reply With Quote
  #43  
Old 01-18-2006, 12:10 AM
 
Richard Walkling Richard Walkling is offline
 

Member
  
Join Date: Apr 2004
Posts: 22
 

Default Simple solution to 301 / 302 redirect problem

Much has been said about Google and other SE requiring 301 permanent redirects - the standard index.php file is:

[Note location may be different]

<?
Header( "Location: ./shop/xcart/customer/home.php" );
?>

Simply change to :

<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: ./shop/xcart/customer/home.php" );
?>


This gives the SE the correct information.

You can check whether you are returning a 301 or 302 here

http://www.searchenginepromotionhelp.com/m/http-server-response/code-checker.php

and more info / alternaive ways here :

http://www.webconfs.com/how-to-redirect-a-webpage.php
Richard
www.manicmonday.co.uk
Reply With Quote
  #44  
Old 01-19-2006, 06:17 PM
 
oilerblue oilerblue is offline
 

Newbie
  
Join Date: Jan 2006
Posts: 8
 

Default

post removed.
__________________
Alan Weidner

x-cart 4.0.16 gold
+ CSS friendly template add-on
Reply With Quote
  #45  
Old 01-20-2006, 08:35 AM
  moneysaver67's Avatar 
moneysaver67 moneysaver67 is offline
 

Advanced Member
  
Join Date: Nov 2005
Posts: 74
 

Default Out-of-the-box solution all from various posts in this topic

Well, after reading through the currently 3 pages of posts on this topic, I thought I'd share what we have done by throwing in our two-bits:

I found this example on page 1, but the output was not as one may desire (with our service provider, at least). Changing to the following took care of displaying w/o a splash and correcting necessary links:

Root index.php File
Code:
<?php //This part takes the html from your front page and turns it into a string. // Replace 'shop' with your x-cart directory. // This mod allowed for proper evaluation of the PHP code on our server. // Prior example worked, but simply output the PHP-skeleton, if you will. $contents = file_get_contents("http://".$_SERVER[SERVER_NAME]."/shop/home.php"); //These functions change the paths of most x-cart related links to their // original locations. Change 'shop' to your x-cart directory name. $contents = ereg_replace("home.php","shop/home.php",$contents); $contents = ereg_replace("product.php","shop/product.php",$contents); $contents = ereg_replace("help.php","shop/help.php",$contents); $contents = ereg_replace("search.php","shop/search.php",$contents); $contents = ereg_replace("cart.php","shop/cart.php",$contents); $contents = ereg_replace("register.php","shop/register.php",$contents); $contents = ereg_replace("pages.php","shop/pages.php",$contents); //This spits out your the html code and the browser does the rest. echo $contents; ?>


Here's an example of our .htaccess file in our root directory. This RewriteEngine suggestion seemed to make perfect sense. In summary, this forces a standard-format version of your domain for help with Google PageRank, etc.
[list=1][*]Resolves http://IP_ADDRESS_HERE to standard URL format[*]Resolves http://DOMAIN_NAME.COM to standard URL format (with www)[*]Resolves http://www.yOuR_doMAin_naMe.coM to standard URL format (converts to proper-case, custom defined)[*]Resolves common ErrorDocuments 400,403, and 404 to root of your site.
  1. e.g. http://www.shop.com/pageDoesNotExist.html
[/list:0b28671784]

In summary, any of the aforementioned link examples ALL resolve back to the root. The benefit of this method is that the first code posted above returns an HTTP Response of 200, which is common and treated just fine by SE indexing bots. As for the link examples using RewriteEngine, they redirect using the Search Engine Friendly 301 Response (Permanent Redirect)

* You can validate all of this via links referenced throughout this topic.

And now, onto the code!

Root .htaccess file
Code:
# REWRITE RULES Options +SymlinksIfOwnerMatch -Indexes <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} !^www\.home-rehab-supply\.com [NC] RewriteRule ^(.*)$ http://www.home-rehab-supply.com/$1 [R=301,L] </IfModule> ErrorDocument 400 http://www.home-rehab-supply.com ErrorDocument 403 http://www.home-rehab-supply.com ErrorDocument 404 http://www.home-rehab-supply.com

From: http://forum.x-cart.com/viewtopic.php?t=25757

Last but not least...

With our version of X-Cart 4.0.16 Gold (as well as the others), default links from clicking on your site logo resolve to http://www.yourdomain.com/shop ... so, we decided to account for this by modifying the shop/index.php to the following:

Our /shop/index.php File
Code:
<? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: ./home.php" ); ?>

The above method utilizes the 301 Response (Permanent Redirect) method, which is exactly what we desired!

As for those of you using the HTML catalog, all of the method utilized above can work for you with simple modification (i.e. changing .php to .html, and changing the index.php example above to utilize the .htaccess Redirect permanent http://... method! Just place that .htaccess inside /shop!)

Hopefully this helps, it seemed to be the solution we needed with NO MODIFICATION to our existing shop, minus modifying the index files.
__________________
X-Cart 4.0.16-.19 Gold [unix] / DSEFU
Reply With Quote
  #46  
Old 05-31-2006, 08:37 AM
 
weswhite weswhite is offline
 

Advanced Member
  
Join Date: May 2006
Location: KS
Posts: 34
 

Default Re: Splash Page Alternatives

Quote:
Originally Posted by lyncca
Hey everyone

Being a person that fairly hates splash pages and has no need for an informational intro page, I just want to get right to my catalog. Problem is as you know, that xcart is not written to do this.

I see several options:

1) Use a redirect -- could have possible problems with search engines, and if you have any part of your site outside the cart, I am not sure that you will then be able to access them (haven't tested it)

2) Use the splash -- ick (in my case).

3) Create an HTML version of your catalog and copy that into your index, which isn't very practical if you want everything streamlined and changes often (with multiple providers)

How does everyone else handle this? Are there any other solutions I havent' thought of?

We are redoing one of our sites with xcart, so you can see why I don't need a splash, www.biz-plates.com .... I'm curious if others have better solutions I haven't thought of. As you can see we have areas of the site that aren't easily integrated with the cart as with just text pages.

Thanks!

You could just delete index.html in your directory. For me it was /store/index.html.
__________________
X-Cart Pro v4.1.1
Reply With Quote
  #47  
Old 05-31-2006, 02:17 PM
 
taltos1 taltos1 is offline
 

Senior Member
  
Join Date: Mar 2005
Location: USA
Posts: 160
 

Default

Hmm. I have read over the post in this thread numerous times and there are numerous solutions it seems. It seems to me at least the two best for SEO are:

From page 2, TelaFirma 's
Code:
Redirect permanent /index.html http://www.yoursite.com/catalog/index.html Redirect permanent /index.php http://www.yoursite.com/catalog/index.html Redirect permanent /index.htm http://www.yoursite.com/catalog/index.html

And from page 4, moneysaver67's
Code:
<?php //This part takes the html from your front page and turns it into a string. // Replace 'shop' with your x-cart directory. // This mod allowed for proper evaluation of the PHP code on our server. // Prior example worked, but simply output the PHP-skeleton, if you will. $contents = file_get_contents("http://".$_SERVER[SERVER_NAME]."/shop/home.php"); //These functions change the paths of most x-cart related links to their // original locations. Change 'shop' to your x-cart directory name. $contents = ereg_replace("home.php","shop/home.php",$contents); $contents = ereg_replace("product.php","shop/product.php",$contents); $contents = ereg_replace("help.php","shop/help.php",$contents); $contents = ereg_replace("search.php","shop/search.php",$contents); $contents = ereg_replace("cart.php","shop/cart.php",$contents); $contents = ereg_replace("register.php","shop/register.php",$contents); $contents = ereg_replace("pages.php","shop/pages.php",$contents); //This spits out your the html code and the browser does the rest. echo $contents; ?>
and the rest of his mod.

Now I am still confused as to what is best? Anyone have any input?

Thanks a lot
__________________
X-Cart Gold Version 4.0.18
EWDHosting.com is my Host
Unix Servers
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:17 PM.

   

 
X-Cart forums © 2001-2020