, July 01, 2013 4:05 PM
To: users@httpd.apache.org
Cc: users@httpd.apache.org
Subject: Re: [users@httpd] redirect based on internal or external IP
The way I would handle this is adding a second rewritecond to each stanza,
looking at REQUEST_URI to make sure that the target path is not there, eg
%{REQUEST_URI} !^/external
RewriteRule ^(.*)$/external [R=301,L]
-Dave
From: Clark, Kim [mailto:kcl...@carlsonwagonlit.com]
Sent: Wednesday, July 03, 2013 12:51 PM
To: users@httpd.apache.org
Subject: RE: [users@httpd] redirect based on internal or external IP
I am receiving the following error
I am new to apache, so forgive me if this is a beginner questions.
I am trying to redirect request to apache based on the IP address. Depending
on where the request originates from, the request will either have a external
or internal IP address. External will be redirected to the external
The way I would handle this is adding a second rewritecond to each stanza,
looking at REQUEST_URI to make sure that the target path is not there, eg
RewriteCond %{REMOTE_ADDR} ^1.1.1.1
RewriteCond %{REQUEST_URI} !^/internal
RewriteRule ^(.*)$ www.site.com/internalhttp://www.site.com/internal