Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

301 Redirect except from my IP address

Status
Not open for further replies.

Geronantimo

Technical User
Apr 3, 2006
79
SE
I have a simple 301 Redirect that redirects all traffic to a particular page to another on a different domain:

Code:
redirect 301 /subdir/index.php [URL unfurl="true"]http://www.newdoain.com/subdir/index.php[/URL]

It works fine, but I still need access to this page.

Is there a way to add to the redirect rule to exclude my IP address from this redirect?

I have also created a new page with a link to the old page and then tried to create a redirect rule that does not redirect from "local" traffic. It didn't work. Is this a possibility?

Regards,
 
I found this and it seems to work:

Code:
<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteCond %{REMOTE_ADDR} !^975\.32\.845\.11$
	RewriteRule ^(.*)$ [URL unfurl="true"]http://www.newdomain.com/subdir/index.php[/URL]
</IfModule>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top