Make site invisible to the public
Started by everfreecreative, Mar 20 2012 10:31 AM
9 replies to this topic
#1
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
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?
But I am not sure why guest view permission is required on home template? Is there some technical requirement for that Ryan?
#5
Posted 20 March 2012 - 02:07 PM
Glad you found it useful
#6
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.
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
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.
#9
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
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.
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













