Redirect in Apache using iptables
Hi there,
I have just setup an LAMP application for an ISP. It is being used for SOHO (Small Office Home Office) and residential clients. What it does is that it presents a web interface through apache that enables the accounts people to setup profiles for the two types of resellers and give them a time span for the module which they paid. for example client 1 who is a SOHO customer pays for the 30 days in which the accounts people profile him for 30 days. So there is a database that triggers when his time is up and triggers a firewall rule to redirect him to the ISP disconnect page. On the disconnect page is the information about the ISP and what they are to do to get re-connected.
Now this was working well for the ISP till when they started getting reseller agents who got clients who will pay them( resellers) directly while they remove their cut and in turn pay the ISP. Sometimes the client fails to pay on time and the LAMP server redirects them to the main ISP page which will now reveal the real ISP instead of the reseller. This started causing problems and the resellers are demanding that the ISP create their own pages on the LAMP webserver too that will reflect their details.
On the webserver (LAMP) the default redirection page for ISP was put at the root of the webserver as 'index.html'. The redirection was possible through an iptables redirect rule which is triggered for each client when they have elapsed their module. What i want to find out is how to redirect each reseller's clients to their reseller's disconnected page through the iptables. For example, maybe reseller 1 wirll have a 'reseller1.html' and reseller 2 will have reseller2.html and so on. How can i redirect in iptables so that the reseller's pages will show instead of the default root index.
Cheers
D.
|