[ale] Apache redirect question

Jerry Yu jjj863 at gmail.com
Fri Sep 15 18:08:58 EDT 2006


Did you try this :

RedirectMatch !^/cgi-bin/(test.pl|test2.pl|other.pl) http://www.newsite.net

since "This directive [redirectMatch] is equivalent to
Redirect<http://httpd.apache.org/docs/2.0/mod/mod_alias.html#redirect>,
but makes use of standard regular expressions, instead of simple prefix
matching. "



On 9/15/06, Jim Popovitch <jimpop at yahoo.com> wrote:
>
> I need to change an existing apache2 server to redirect all but a
> handful of URLs to an external site.  Right now I can redirect all but
> one URL using the following syntax:
>
>     RedirectMatch !^/cgi-bin/test.pl http://www.newsite.net
>
> The above transfers all incoming requests to www.newsite.net, but still
> allows for access to www.oldsite.net/cgi-bin/test.pl
>
> What I want to do is also allow access to the following:
>
>     www.oldsite.net/cgi-bin/test2.pl?blah
>     www.oldsite.net/cgi-bin/other.pl
>
> Any idea on how this would be accomplished while still redirecting
> everything else to www.newsite.net?
>
> TIA,
>
> -Jim P.
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
-------------- next part --------------
An HTML attachment was scrubbed...




More information about the Ale mailing list