Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Installing Zen Cart / Installing on a Linux/Unix Server / Re-direct viewers till my sites ready?

Re-direct viewers till my sites ready?

Started by cookiepus on 20 Jul 2011, 10:37 AM · Views: 1,160

Results 1 to 9 of 9
20 Jul 2011, 10:37 AM
#1
cookiepus avatar

cookiepus

Zen Follower

Join Date:
Jan 2010
Posts:
131
Plugin Contributions:
0

Post #1 by cookiepus

Hello
I need to do a new install of Zencart.
Its going to be a replacement for a current site.
I want to install Zen on the proper home directory were hopefully it will live happily ever after.
I want to avoid installing it in a temp sub-directory while i spend a few weeks getting it ready to go live.
then having to move it into the main directory.
i've tried to do this moving before and it ended in tears:no:

My question is -
How do i re-direct people away to a temp page, I don't want them to see the zen 'index.php' until its ready.

Thanks everyone

20 Jul 2011, 12:16 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #2 by stevesh

I just use a blank white page named index.html in the root directory. You could put some sort of 'Coming Soon' message on it. Most servers are set up to load index.html before index.php.

20 Jul 2011, 12:53 PM
#3
cookiepus avatar

cookiepus

Zen Follower

Join Date:
Jan 2010
Posts:
131
Plugin Contributions:
0

Post #3 by cookiepus

Thanks Stevesh
if thats the case (index.html loads before index.php)
then i have nothing to worry about :smile:

Cheers
Cookie

20 Jul 2011, 2:42 PM
#4
llynix avatar

llynix

Zen Follower

Join Date:
Jul 2009
Location:
Texas
Posts:
210
Plugin Contributions:
0

Post #4 by llynix

I wrote a short article awhile back on how to redirect using .htaccess It's a little more complicated but it will allow you access to your site while others get redirected.

llynix.com/articles/htaccess-under-construction

DentalPlanet Designed/Administrated by Falls Geek

9 Aug 2011, 12:06 PM
#5
cookiepus avatar

cookiepus

Zen Follower

Join Date:
Jan 2010
Posts:
131
Plugin Contributions:
0

Post #5 by cookiepus

This is what worked for me..............

Merlinpa1969
Black Belt

Merlinpa1969's Avatar

Join Date: Mar 2004
Location: Trapped in this box
Posts: 16,007

Default Re: Anyone know how to make index.html default instead of index.php?
ok not a problem

Put a .htaccess file in your web root directory, if there isn't one yet.

Then add the line:

DirectoryIndex index.html index.htm index.php

or change it accordingly.
That line tells apache what file to look at first when it is not specified in the URL, in the same order that you put it after DirectoryIndex.

In this example it would first look for index.html, load it if found, if not look for index.htm, load it if found, and if not load index.php.
##############################___
Camelot-hosting.com A PCI Compliant E-Commerce Host.

17 Jan 2012, 10:27 AM
#6
cookiepus avatar

cookiepus

Zen Follower

Join Date:
Jan 2010
Posts:
131
Plugin Contributions:
0

Post #6 by cookiepus

i want to re-direct to main.html till my sites ready.
main.html contains 'under construction' text

My .htaccess contains text below

DirectoryIndex main.html index.htm index.php

This works in that main.html is what is shown.

The problem im having now is even when i type in my index.php URL
i get re-directed to main.htm.
so i cant see my zencart homepage

if i remove .htaccess, then i (and everyone else) sees my unfinished zencart index page

Help please!
Cookie

17 Jan 2012, 11:17 AM
#7
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #7 by stevesh

Is there a reason you don't just rename main.html to index.html, or is your server configuration such that index.html doesn't load first ?

17 Jan 2012, 11:30 AM
#8
cookiepus avatar

cookiepus

Zen Follower

Join Date:
Jan 2010
Posts:
131
Plugin Contributions:
0

Post #8 by cookiepus

Hi
it was index.html
i just changed it to 'main.html' try to fix the problem.
re:server configuration -yes - index.html doesnt load
if i remove the .htacces
the server goes straight to my zencart index.php
i just need to see this page privately

Thanks

17 Jan 2012, 11:43 AM
#9
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #9 by stevesh

I haven't seen a server set up that way, but the only other thing I can think of would be to password-protect the site, usually doable in your hosting control panel.