Page 1 of 1

Redirect in htaccess based on IP unexpected results

Posted: Thu Apr 23, 2009 1:17 pm
by matthijs
I've got this htaccess on a site:

Code: Select all

 
RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^12\.123\.123\.123
RewriteRule ^(.*)$ http://temp.wordpress.com [R=302,L]
which redirects everyone but me to the other http://temp.wordpress.com site.

However, now I'm editing pages in Wordpress, installed on that site, and I get a 403 when editing a page. I think it has something to do with the request headers, which look like

Code: Select all

/wp-admin/page.php?action=edit&post=9&_wp_original_http_referer=http%3A%2F%2Fwww.thewebsite.nl%2Fwp-admin%2Fedit-pages.php&message=1
If I get rid of the wp_original_http_referer=http%3A%2F%2Fwww.thewebsite.nl I do get access.

Does someone understand what could be happening here?