Jump to content

Make site invisible to the public


thetuningspoon
 Share

Recommended Posts

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.

Link to comment
Share on other sites

I actually have had similar need few times. There is a module for it (maintenance mode: http://processwire.com/talk/topic/382-module-maintenance-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?

  • Like 1
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...