In an Enterprise Network, We require a Software to Intercept HTTP Traffic, Examine Headers and Send 302 Response if needs to be Redirected - Using TAP/Mirror Port/SPAN Traffic originating from Users towards Internet in an Enterprise Network.
SPAN/Port Mirroring/Passive Network TAP will be done between User and Internet Gateway.
All the traffic from user to internet will be Mirrored and Provided to another port.
A Server will be connected to the Mirror port, where we receive copy of all traffic from users towards internet. Now we would like to have an application to examine the PORT 80 Traffic alone to inspect TCP and HTTP headers, apply required business logic to decide whether to redirect or not. If Redirect required, the application should send response to user with 302 HTTP redirect. For example, if the user is trying to browse a particular URL, we need to redirect the URL to some other URL as like captive portal works.
PLEASE Refer the attached arch network diagram