Copyright © ashik rahman's Blog

Thursday, February 27, 2014

By .htaccess to redirect all traffic to root or holding page

Add the following to the file and save.
RewriteEngine on
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) / [R=301,L]
Now all traffic will redirect to the root. YOu could also do this for a holding page if you like:
RewriteEngine on
RewriteCond %{REQUEST_URI} !/holdingpage.php$
RewriteRule (.*) /holdingpage.php [R=301,L]