On 10/30/07, Robinson Craig <[EMAIL PROTECTED]> wrote:
> Hi Folks,
>
> I have to redirect any requests for a particular path to another server
> for a few months, and I am successfully using:
>
> RedirectPermanent /about http://newServer/about
>
> However, an additional requirement has emerged where they want a
> sub-directory within this path to not be redirected:
>
> Eg. /about/announcements
>
> Apart from putting in individual redirects for every directory under
> /about, is there such a concept as an "exclusion list". For example,
> redirect everything under /about EXCEPT /about/announcements.
>
> Any tricky suggestions appreciated.

You can use RedirectMatch with a negative-lookahead to check for the
excluded address, but it probably easier just to use mod_rewrite:
RewriteEngine On
RewriteRule ^/about/announcements - [L]
RerwiteRule ^/about(.*) http://newServer/about$1 [R=permanent]

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to