Page 1 of 2
how do you disable the site from being seen to work behind
Posted: Tue 3. Jul 2007, 05:18
by parkley
Hello, I'm new to phpwcms... is there a way i could shut down phpwcms where i can make template & conent development changes without the public being able to view it... other than moving everything to a sub folder
also when i hit preview it takes me to the same view that the public sees...
visible for users logged on only doesn't seem to work
Posted: Tue 3. Jul 2007, 12:43
by update
Welcome!
You could do the following:
Place a file called index.html into your phpwcms root folder with some content like this:
Code: Select all
<html>
<head>
<title>This page is under construction.</title>
</head>
<body background="bg.gif" bgcolor="#333366" text="#FFFFFF" link="#0066CC"
vlink="#999999" alink="#993300">
<table width=100% height=100% border=0>
<tr><td align=center valign=center>
<font face="century gothic, Arial, Helvetica">
<p><font face="Arial Black">
Coming soon ;-)
</font>
</td></tr>
</table>
</body>
</html>
Then change (or add) in apache2.conf (or whereever your site conf is living)
Code: Select all
DirectoryIndex index.html
Options -Indexes
#no index.php! This you can enter into browser by hand...
#Later on you would like to add index.php (first item then) to let your site live
Restart your Apache
That's it.
Now when somebody enters
http://www.yoursiteaddress.tld he gets the index.html with "Coming soon ;- )"
Give it a try
Greetings
claus
Posted: Tue 3. Jul 2007, 21:48
by Jensensen
or just save index.html to your root directory with link to your old projekt/server:
Code: Select all
<HTML>
<HEAD>
<TITLE></TITLE>
<META http-equiv=Refresh Content="0; url=http://www.server.com/old/projekt/or/something/">
</HEAD>
</HTML>
greetz
Posted: Tue 3. Jul 2007, 22:42
by Goran
I belive that parkley want ability to temporarily close the phpWcms front for non admin users.
Solution like special index.html file in site root will not stop visitors to browse the phpWcms pages accesed directly, by typeing the URL directly into their browser, or from search engines that index the site.
Posted: Tue 3. Jul 2007, 23:02
by Jensensen
such a feature is NOT available yet(?)
but instead USE
.htaccess to prevent robots from indexing php-files
OR grant access to certain users (prevent directory)
usual server authentication with user/pwd
OR develop your site in a sub directory. move all files and adjust --> config and settings (only once) when ready to go online --> afterwards, later
OR work --> local using
XAMPP (windows)
MAMP (mac)
to able to ftp/move your site as a whole to the "live-server"
greetz
Posted: Tue 3. Jul 2007, 23:29
by Goran
Jensensen wrote:such a feature is NOT available yet(?)
Yes, I know.
btw. preventing robots from indexing php-files, grant access to certain users using htaccess file, develop site in a sub directory or local using is not acceptable solution for anything except new site/domain development.
Posted: Tue 3. Jul 2007, 23:57
by Jensensen
i know as well,
but the statement was well-meant as rather common suggestions.
what IS to be said against working in a sub directory?
or using index.html??
only some hours later, the main articles are online to prevent main nav running into 404s
and - thenceforward - the site is growing...
greetz
Posted: Wed 4. Jul 2007, 01:45
by Goran
Jensensen wrote: i know as well,
Of course you know, you wrote that.
Jensensen wrote:what IS to be said against working in a sub directory?
Nothing, but this guy clearly asked for replacement for working in a sub directory(please read again first post). I believe he asked for ability to temporarily close the phpWcms front for non admin users. This feature is usual called "Down for Maintenance" and still not part of the phpWcms....not for a long time I believe. With coming user managment system this can be done very easy.
Jensensen wrote:..or using index.html???
Ok..again, solution like special index.html file in site root will not stop visitors to browse the phpWcms pages accesed directly, by typeing the URL directly into their browser, or from search engines that index the site.
Re: how do you disable the site from being seen to work behi
Posted: Wed 4. Jul 2007, 01:59
by Peekay
parkley wrote:also when i hit preview it takes me to the same view that the public sees...
Unless things have changed in the very latest version, if you are logged in to the backend you will be able to preview everything, including pages where you have turned visible/public 'off'. This is so you can work on them and preview the results. Ordinary site visitors however cannot see those pages. Log out to see the difference.
visible for users logged on only doesn't seem to work
AFAIK that feature is not enabled as yet.
I think most Apache servers will run index.html before index.php, so as claus suggests, a simple 'We are closed for maintenance' HTML file should do.
Posted: Wed 4. Jul 2007, 03:16
by DeXXus
Unless I am missing something,
Peekay has given the answer that ~sounds~ correct for the question asked. Additionally, the Start and End dates for "content" can be set for some time in the future (when you anticipate to unveil your finished work) and phpWCMS will not publish it to visitors until that time arrives!

Posted: Wed 4. Jul 2007, 04:49
by parkley
ok thanks guys for your suggestions/ideas & quic response let me try these senarios out right now
Re: how do you disable the site from being seen to work behi
Posted: Wed 4. Jul 2007, 05:41
by parkley
Peekay wrote:
Unless things have changed in the very latest version, if you are logged in to the backend you will be able to preview everything, including pages where you have turned visible/public 'off'. This is so you can work on them and preview the results. Ordinary site visitors however cannot see those pages. Log out to see the difference.
it the same result logged in or out.... when i hit preview i see what the public see
it's like i'm not even logged in, yet i'm logged in hitting the preview button as an admin

Re: how do you disable the site from being seen to work behi
Posted: Wed 4. Jul 2007, 08:41
by DeXXus
parkley wrote:Peekay wrote:
Unless things have changed in the very latest version, if you are logged in to the backend you will be able to preview everything, including pages where you have turned visible/public 'off'. This is so you can work on them and preview the results. Ordinary site visitors however cannot see those pages. Log out to see the difference.
it the same result logged in or out.... when i hit preview i see what the public see
it's like i'm not even logged in, yet i'm logged in hitting the preview button as an admin

You must be saying that you phpWCMS is always remembering you (logging you in automatically)...is that it ?? You'll have to clear cookies, if logging out doesn't work. Clear your browser cache, too !
The ONLY way you could even be ABLE to hit preview... is IF you are logged in. AND whenever you DO hit preview...You (as Admin) are ALWAYS going to see what the visitors WOULD see if you made the site visible/public -or- article start date is in range.
Posted: Wed 4. Jul 2007, 10:06
by update
Mmmh
Did you set
Code: Select all
$phpwcms['SESSION_FEinit'] = 1; // set 1 to enable sessions in frontend, 0 to disable sessions in frontend
in conf.inc.php?
Then it would be really sufficient to set every main structure link to visible only when logged in, create a user for logging in into frontend only (through an other browser) and voila. Or am I completely wrong?
On the other hand this is true (should be - what else is an admin for?)
You (as Admin) are ALWAYS going to see what the visitors WOULD see if you made the site visible/public
and much more straightforward
Down for Maintenance
Posted: Wed 4. Jul 2007, 11:21
by Goran
Here's a temporary solution, works fine on my test installation...now you can turn off the phpWCMS frontend for non admin users in conf.inc.php, just set
$phpwcms['down_for_maintenance'] to
1.
-----------------------------------------------------------
1. Create html file closed.html in phpWCMS root directory
2. Open config/phpwcms/conf.inc.php and enable sessions in frontend:
3. Same file(config.inc.php), add this code under
// other stuff group:
Code: Select all
$phpwcms['down_for_maintenance'] = 1; // set 1 to disable frontend for non admin users
4. Open index.php and find this line:
require_once (PHPWCMS_ROOT.'/config/phpwcms/conf.template_default.inc.php');
and add the following code before/above:
Code: Select all
if($phpwcms["down_for_maintenance"] && empty($_SESSION["wcs_user_admin"])) {
headerRedirect($phpwcms['site'].$phpwcms["root"].'closed.html');
}