trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Hedstrom <>
Subject Re: Redirection (302 or 301) from a non remap plugin.
Date Mon, 16 Apr 2012 20:59:53 GMT
On 4/16/12 8:59 AM, Servalan eq wrote:
> Is there a way to do a (302) redirection from the non remap plugin?
> I have a remap plugin where this works - by setting he elements of the URL
> and then setting redirect = 1 on the TSRemapRequestInfo object.
> From a standard plugin hooked to the TS_EVENT_HTTP_READ_REQUEST_HDR I
> have my two servers being reverse proxied by calling TSUrlHostSet, 
> TSUrlPathSet
> and then
>   TSSkipRemappingSet(txnp, 1);
> but in some cases I need to issue a redirect request.

You can not use any o fthe "RRI" stuff in anything but a remap plugin (it 
simply doesn't apply or map to anything in the core). You should however 
just have to set the appopriate response headers, and response codes. 
There's for example a blacklist plugin example, which shows one way to do this.

-- Leif

View raw message