CanHasPotato
10-22-2009, 02:07 AM
So whenever I need to close my site for maintenance, is it possible for every page but the page being redirected to to redirect to a page. Sorry if its confusing, but it would be like:
if ($url = '/(.*)' && $url !== '/redirectedto.php') {
// redirect to /redirectedto.php
}
else {
// do nothing since they are already at the page
}
Also, is it possible to not redirect only for a few IPs?
if ($url = '/(.*)' && $url !== '/redirectedto.php' && $ip !== '71.178.x.xx' ) {
// redirect to /redirectedto.php
}
else {
// do nothing since they are already at the page
}
if ($url = '/(.*)' && $url !== '/redirectedto.php') {
// redirect to /redirectedto.php
}
else {
// do nothing since they are already at the page
}
Also, is it possible to not redirect only for a few IPs?
if ($url = '/(.*)' && $url !== '/redirectedto.php' && $ip !== '71.178.x.xx' ) {
// redirect to /redirectedto.php
}
else {
// do nothing since they are already at the page
}