Hi, I'm sure someone must know this.
I want to hide a site that's in development from search engines and users while the site is in developer mode.
Is there a way to redirect any visitors to a given page when the environment type = dev & they aren't logged in?
I've tried this in _config.php in /mysite/
if (Director::isDev() & !Member::currentUserID()) {
Director::redirect(Director::baseURL());
}
No worky.
Thanks.