how do you disable the site from being seen to work behind

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
parkley
Posts: 19
Joined: Fri 9. Feb 2007, 02:57

how do you disable the site from being seen to work behind

Post 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
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Post 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
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Post 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
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

Post 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.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Post 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
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

Post 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.
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

Post 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
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

Post by Goran »

Jensensen wrote: i know as well,
Of course you know, you wrote that. :shock:
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.
Peekay
Posts: 286
Joined: Sun 25. Jul 2004, 23:24
Location: UK

Re: how do you disable the site from being seen to work behi

Post 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.
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post 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! :wink:
parkley
Posts: 19
Joined: Fri 9. Feb 2007, 02:57

Post by parkley »

ok thanks guys for your suggestions/ideas & quic response let me try these senarios out right now
parkley
Posts: 19
Joined: Fri 9. Feb 2007, 02:57

Re: how do you disable the site from being seen to work behi

Post 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 :evil:
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Re: how do you disable the site from being seen to work behi

Post 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 :evil:
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.
User avatar
update
Moderator
Posts: 6455
Joined: Mon 10. Jan 2005, 17:29
Location: germany / outdoor

Post 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
Goran
Posts: 81
Joined: Thu 27. Nov 2003, 11:43
Location: Zagreb, Croatia
Contact:

Down for Maintenance

Post 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:

Code: Select all

$phpwcms['SESSION_FEinit']    = 1; 
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');
}
Post Reply