Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Home Page Redirection

Home Page Redirection

Views: 1,184

Results 1 to 11 of 11
23 Sep 2011, 7:30 PM
#1
wilson_li avatar

wilson_li

New Zenner

Join Date:
Jul 2011
Location:
New Jersey
Posts:
98
Plugin Contributions:
0

Home Page Redirection

Hello All,

I have a problem with the zen-cart homepage. In general, when Zen-cart deployed, you typed "www.yourdomain.com" onto the browser and you'll go through the "index.php" pre-defined by zen-cart.

Can I set my homepage source file to other files I designed like "index.htm", "index.html"?

Here is the my zen-cart site https://www.campbellsloft.com, this goes through "index.php".

Here is the home page I designed https://www.campbellsloft.com/index.html

Can anyone give me some suggestions that I could set "index.html" to my homepage source rather than "index.php"?

So basically, if I type https://www.campbellsloft.com, it will direct to https://www.campbellsloft.com/index.html

Thank

23 Sep 2011, 8:31 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Home Page Redirection

Talk to your hosting company about the correct way (on their server) to change your domain's DirectoryIndex to "index.html index.php" instead of "index.php index.html"

23 Sep 2011, 8:37 PM
#3
wilson_li avatar

wilson_li

New Zenner

Join Date:
Jul 2011
Location:
New Jersey
Posts:
98
Plugin Contributions:
0

Re: Home Page Redirection

I renamed the "index.php" -> "index1.php", keep the index.html. When I typed https://www.campbellsloft.com it redirected to the index.html, that's great!

However, when I click the "Rugs" category from homepage, it redirected to an empty page:

I'm guessing because I renamed "index.php" which caused this problem, how can I resolve this? Anyone?

23 Sep 2011, 8:37 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Home Page Redirection

I already answered your question above.

23 Sep 2011, 8:50 PM
#5
wilson_li avatar

wilson_li

New Zenner

Join Date:
Jul 2011
Location:
New Jersey
Posts:
98
Plugin Contributions:
0

Re: Home Page Redirection

DrByte:

Talk to your hosting company about the correct way (on their server) to change your domain's DirectoryIndex to "index.html index.php" instead of "index.php index.html"

I ask my host provider (Godaddy), they told me that .php file has a higher priority within operating system. So it doesn't matter whether they change the directoryindex.

23 Sep 2011, 10:12 PM
#6
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,604
Plugin Contributions:
0

Re: Home Page Redirection

Godaddy strikes again ... best suggestion? Find another host.

23 Sep 2011, 11:39 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Home Page Redirection

wilson_li:

I ask my host provider (Godaddy), they told me that .php file has a higher priority within operating system. So it doesn't matter whether they change the directoryindex.
If they can't give you a way to change the DirectoryIndex setting within your own domain, then they have no clue what they're doing and have no business being in the webserver hosting business.

Run. FAST.

Seriously.

In the meantime, add this line to an /.htaccess file in the root of your site: DirectoryIndex index.html index.htm index.php
Whether that works or not, get a more useful host who knows what they're doing.

23 Sep 2011, 11:53 PM
#8
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Home Page Redirection

Aside from the technical issues, you do realise that the current HTML index page will render you a ZERO page rank on Google... The links to anywhere are embedded in a flash file (that took 22 seconds to load on my browser - despite the fact that I have a superfast fibreoptic connection).

Google will get to that (if it is your landing page) and then stop dead in its tracks. It cannot go anywhere into the site, because there is no mechanism for it to do so.

A further consideration is that the HTML landing page will be invisible in all handhelds that currently deny flash content (all Apple iPads, and a few androids too).

So...

  • You have a page that takes so long to load that nobody will bother waiting.
  • You have a page that Google will completely ignore
  • You have a page that an increasing number of mobile internet viewers will never be able to see.

Now... ditch this silly plan and get on with the task of making ZC your proper site... or perhaps you have no real interest in making any sales?

... and if you can, get out of GoDaddy... they do not know how to configure servers to run eComm properly...

24 Sep 2011, 7:57 PM
#9
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: Home Page Redirection

These guys are right on two counts. Count one: When I built my first Zen Cart site I wanted to do an .html landing page and ran in to the same thing. Contacted my host who immediately changed the priority for my site. Any good host should be willing to do so.

Count two: I soon discovered that having a landing page was a stupid idea, and nuked it.

24 Sep 2011, 11:26 PM
#10
wilson_li avatar

wilson_li

New Zenner

Join Date:
Jul 2011
Location:
New Jersey
Posts:
98
Plugin Contributions:
0

Re: Home Page Redirection

Thanks guys

I cannot locate the ./htaccess file in my root directory. However, there are some .htaccess files under the /pub, /media, /includes, /image, /extra ...... Do I need to add "DirectoryIndex index.html index.htm index.php" to each of them? Or I only need to create another blank ".htacess" file and add this line?

One more thing, can I add the line syntax like that :

(DirectoryIndex index.php?page=page1)

Thanks

24 Sep 2011, 11:29 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Home Page Redirection

You would just add your own new .htaccess to the root of your site.
Don't touch the other ones, as it's irrelevant in those folders.

No, you can't add other parameters. Just the filenames: index.html index.php etc