I have a domain that redirects all trafic to an existing site. Now I need to start developing it. I want to keep it redirecting like it does now: Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^(.*)$ http://www.otherdomain.com/ [R=301,L] Code (markup): But my own IP should be excluded form this. How would I go about adding such an 'if statement'? if IP != 123.456.78 { RewriteRule ^(.*)$ http://www.otherdomain.com/ [R=301,L] } Code (markup): Is that possible at all?
Answering myself for future reference: Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteCond %{REMOTE_ADDR} !^123.456.78.90 RewriteRule ^(.*)$ http://www.otherdomain.com/ [R=301,L] Code (markup): The ! will cause all IPs that are NOT the one written there to be redirected, keeping myself in that folder. Thanks for tuning in to todays useless monologue!
Thanks Foxy, you too have a smashing 2007! Note to self: DO NOT FORGET TO UNCLOAK IT AND WONDER WHY IT GETS NO TRAFFIC!