i am running a website and my website root directory have .htaccess and index.php, now i want to redirect all user’s/traffic to “Under-Construction.php” page except my ip address.
i.e
http://www.example.com redirect to “www.example.com/under-construction/under-construction.php”
except my ip address.
- How can do this with .htaccess.
- How can do this with index.php.
example: if $_SERVER[‘REMOTE_ADDR’] is 123.123.123 redirect index.php else redirect “www.example.com/under-construction/under-construction.php”
Regards.
Like this with php. Put the code at the top of
index.php.