Posted - 02/04/2019 : 15:20:42
I have vacation page & maintenance page on the server. When it's time to trot off on holiday  or crack on with some maintenance this is my solution. What I have done is to force all traffic to the vacation page via .htaccess in the root directory. Takes less than two minutes. I just add the following to .htaccess using either FTP or cPanel. The following can also be used to show a maintenance page. Just change the page highlighted in bold red so that your chosen page shows. As it's a temporary redirect, as highlighted in bold blue, the search engines also know the score # VACATION-PAGE REDIRECT <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REMOTE_ADDR} !^123\.456\.789\.000 RewriteCond %{REQUEST_URI} !/ [red]vacation.html[/red]$ [NC] RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC] RewriteRule .* /[red] vacation.html[/red] [[blue] R=302[/blue],L] </IfModule> or # MAINTENANCE-PAGE REDIRECT <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{REMOTE_ADDR} !^123\.456\.789\.000 RewriteCond %{REQUEST_URI} !/ [red]maintenance.html[/red]$ [NC] RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC] RewriteRule .* /[red] maintenance.html[/red] [ [blue]R=302[/blue],L] </IfModule> Will - Bolton Manchester UK

|