Jump to content


Photo

Make site invisible to the public


  • Please log in to reply
9 replies to this topic

#1 everfreecreative

everfreecreative

    Sr. Member

  • Members
  • PipPipPipPip
  • 110 posts
  • 43

  • LocationCT, USA

Posted 20 March 2012 - 10:31 AM

What's the best way to make a Processwire site temporarily invisible to the public? I'd like to be able to access the admin area and visit the site as an admin, but block pages from guests. I tried removing the view permissions for guests, but PW says this is a required permission.

#2 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,526 posts
  • 854

  • LocationVihti, Finland

Posted 20 March 2012 - 10:35 AM

I actually have had similar need few times. There is a module for it (maintenance mode: http://processwire.c...intenance-mode/) which you can use. I have usually just checked on my templates that if user is not logged in, then display some message or redirect somewhere.

But I am not sure why guest view permission is required on home template? Is there some technical requirement for that Ryan?

#3 diogo

diogo

    Hero Member

  • Moderators
  • 2,004 posts
  • 1079

  • LocationPorto, Portugal

Posted 20 March 2012 - 10:41 AM

just checked on my templates that if user is not logged in, then display some message or redirect somewhere


If you want to do it often, you can put a checkbox on your home template to turn this OF and ON

#4 everfreecreative

everfreecreative

    Sr. Member

  • Members
  • PipPipPipPip
  • 110 posts
  • 43

  • LocationCT, USA

Posted 20 March 2012 - 11:04 AM

The maintenance mode module is exactly what I was looking for. Thanks!

#5 Pete

Pete

    Administrator

  • Administrators
  • 1,756 posts
  • 658

  • LocationChester, England

Posted 20 March 2012 - 02:07 PM

Glad you found it useful :)

#6 everfreecreative

everfreecreative

    Sr. Member

  • Members
  • PipPipPipPip
  • 110 posts
  • 43

  • LocationCT, USA

Posted 26 March 2012 - 09:38 AM

So the maintenance module has been great at keeping the site private while still allowing us to work on it in the background. Unfortunately, the issue I now have is that I want to show the site off to my client, but don't want to give them edit permissions. I tried creating a new user with just view permissions, but when I tried to log in with the new user, it threw the browser into an infinite redirect loop. Is there anything I can do to fix this, or is there another approach I could take?

Thanks.


EDIT: Even when I add edit permissions the loop still happens.

EDIT 2: Oops, just read the plugin thread more carefully. Sounds like I'm looking for a feature that doesn't exist yet. Looks like I'll have to move my site into a subdirectory for now. I'm still not sure why I'm getting the looping, though. Might want to look into that, Pete.

#7 alanfluff

alanfluff

    Sr. Member

  • Members
  • PipPipPipPip
  • 405 posts
  • 118

  • LocationOttawa, Canada

Posted 26 March 2012 - 10:19 AM

@everfreecreative Apologies you probably know this already, but, if you have easy access to make subdomains like thisone.example.com then putting demo sites in subdomains is I find much simpler as all software still regards itself as in the root (of the subdomain) and so no reconfiguration relating to stuff no longer being on the root is required. I often have dev1.example.com dev2.example.com.

#8 everfreecreative

everfreecreative

    Sr. Member

  • Members
  • PipPipPipPip
  • 110 posts
  • 43

  • LocationCT, USA

Posted 26 March 2012 - 10:42 AM

Holy smokes, that was easy! I didn't even have to create a subdomain or edit a config file and ProcessWire still works without being in the root directory :)

#9 alanfluff

alanfluff

    Sr. Member

  • Members
  • PipPipPipPip
  • 405 posts
  • 118

  • LocationOttawa, Canada

Posted 26 March 2012 - 10:48 AM

Yes, I've not tried it but I read PW is much more friendly when it comes to using it not directly below root :)

#10 Pete

Pete

    Administrator

  • Administrators
  • 1,756 posts
  • 658

  • LocationChester, England

Posted 26 March 2012 - 11:14 AM

Hmm, I'll have a look into that loop as well as maybe add an option to select individual users who you want to be able to see the site (it does make sense).

As for PW in a sub folder - the only thing to ear in mind really is URLs in a TinyMCE field if you do any editing as they will use the path of wherever PW is at the time. In this case you can use ruan's PageLinkAbstracter module (see the modules page on the site) and set the body field accordingly. I doubt you'll need to use it in this case but it's worth knowing about.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users