Htaccess redirect exclude ip address

I used this htaccess example to redirect all the users who visit my website to the old directory except me. So I can build the new website en test it without being redirected.

Now when you guys visit www.pietervanos.net you will be redirected to www.pietervanos.net/old
But when I visit it, I will still be able to visit www.pietervanos.net/ where the new website is being build.

Change the end of the following line to your ip address:
RewriteCond %{REMOTE_ADDR} !=12.34.56.78

Leave a Reply

Your email address will not be published. Required fields are marked *

-->