Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Need a blank mainpage - not zencart

Need a blank mainpage - not zencart

Views: 2,846

Results 21 to 28 of 28
18 Mar 2011, 8:33 PM
#21
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Need a blank mainpage - not zencart

The down for maintenance page will still have the header, sidebars, etc... unless you add stylesheet rules to make all those "display: none;"

For simplicity and reliability, it would be best to buld the site in its final location, as long as you can make visitors see a "blank" page (if you do want some product info on it, it won't be blank).

Luciano's code might do just what you want, if you change the 503 to index and the php to html.

18 Mar 2011, 8:42 PM
#22
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Need a blank mainpage - not zencart

For information,

RewriteCond %{REMOTE_HOST} !^YOUR_IP_ADDRESS applies the rewrite to any visitor who is not you.
RewriteCond %{REQUEST_URI} !^/index.html [NC] exempts index.html from being rewritten, so as not to make an infinite loop.
RewriteRule .* /index.html shows index.html when the rewrite applies.

I am not positive about the precise details of the code, as I haven't worked with .htaccess files myself. It would be good if someone can confirm that this is correct for the intended use.

18 Mar 2011, 9:00 PM
#23
luciano9876 avatar

luciano9876

New Zenner

Join Date:
Jan 2011
Posts:
26
Plugin Contributions:
0

Re: Need a blank mainpage - not zencart

I forgot about the locking out part if the IP address changes.

For the past years I have had a "dynamic" IP-address on my ADSL, that only changed if there was maintenance of if I changed provider. In other words, almost never:-). if it does change, you might need to edit the .htaccess

If you want to use the default page, you don't need stylesheets to remove the sidebars and such:
Admin->configuration-> website maintenance and turn off or on everything like you want it. Be sure to include your ip-address in this line: Down For Maintenance (exclude this IP-Address)
With the same problem, that if your ip address changes, you would have to change it.

For the blank page, gjh42's option might be the best.

18 Mar 2011, 9:06 PM
#24
luciano9876 avatar

luciano9876

New Zenner

Join Date:
Jan 2011
Posts:
26
Plugin Contributions:
0

Re: Need a blank mainpage - not zencart

I am not sure about that. Maybe the easiest would be to rename index.html to 503.php and use the .htaccess without changing it.

or try this for 503.php:

<?php
ob_start();
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 86400');
header('X-Powered-By:');

In the latter option you return the correct code to search engine bots, and still have a white page if I am correct.

18 Mar 2011, 9:08 PM
#25
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Need a blank mainpage - not zencart

Right, I had forgotten that there was so much admin control on the down for maintenance page.

19 Mar 2011, 1:37 AM
#26
znowflake avatar

znowflake

New Zenner

Join Date:
Jul 2008
Posts:
98
Plugin Contributions:
0

Re: Need a blank mainpage - not zencart

The blank page works fine using the 503 and htacess files, but my reason for making this post was to be able to add an index.html page that could be edited when needed.

I still dont have a clue how to get that one to work :(

19 Mar 2011, 1:41 AM
#27
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Need a blank mainpage - not zencart

Did you try my code in red in post 22 for the .htaccess? Did it work? (You would have to have an index.html file in place for it to redirect to.)

19 Mar 2011, 1:48 AM
#28
znowflake avatar

znowflake

New Zenner

Join Date:
Jul 2008
Posts:
98
Plugin Contributions:
0

Re: Need a blank mainpage - not zencart

Ok i must be really tired, cos i got them both working.

The non editable page works fine using the 503 and htaccess files and the editable page works using the rewrite code gjh42 added.

Thx for all the help guys :hug: