- Joined
- Jun 19, 2007
- Messages
- 1,668
- Reaction score
- 147
<?php
$maintenance = "1";
if ($maintenance=="1")
header( 'Location: http://www.yoursite.com/maintenance.php' ) ;
else
header( 'Location: http://www.yoursite.com/index.php' )
?>
idk if this is how to do it im rusty on php bu there
PHP:<?php $maintenance = "1"; if ($maintenance=="1") header( 'Location: http://www.yoursite.com/maintenance.php' ) ; else header( 'Location: http://www.yoursite.com/index.php' ) ?>
Thanks for trying but the code didn't work for me. I also tried editing your code but it still didn't work.
<?php
$maintenance = "1";
if ($maintenance=="1")
include("http://www.yoursite.com/maintenance.php") ;
else
include("http://www.yoursite.com/index.php") ;
?>
<?php
$maintenance = "1";
if ($maintenance == "1") {
include("http://www.yoursite.com/maintenance.php") ;
}
?>
Also, I'd advise you using after you've included the mainteance.phpno its becasue your getting a loop
just use this mate
dose work i tested itPHP:<?php $maintenance = "1"; if ($maintenance == "1") { include("http://www.yoursite.com/maintenance.php") ; } ?>
<?php
$maintenance = "1";
if ($maintenance == "1") {
include("http://www.yoursite.com/maintenance.php") ;
// lets cut of the rest of the script :)>
die;
}
?>
And the genius of the day award goes to coolep6 :laugh:no its becasue your getting a loop
RewriteEngine on
# Comment out the next line if you want to stop redirecting.
RewriteRule !^(favicon\.ico|maintainance\.php) maintainance.php [L]