Web re-direct on the AX3030
g.nelson
Member ✭
Hi all,
We are trying to set up an application on two servers fronted by the A10. Everything functionally up but clients cannot access the web pages. As an example the VIP url is https://test.ntu.ac.uk. The DNS A record is 192.168.99.39.
However, the actual page on the server is https://test.ntu.ac.uk/jukeboxdrm.
Can this be achieved on the A10 or is programming needed on the webserver to redirect https://test.ntu.ac.uk to https://test.ntu.ac.uk/jukeboxdrm.
Would a cname on the DNS of test.ntu.ac.uk pointing to test.ntu.ac.uk/jukeboxdrm work.
We are also doing SSL offload on the servers.
We are trying to set up an application on two servers fronted by the A10. Everything functionally up but clients cannot access the web pages. As an example the VIP url is https://test.ntu.ac.uk. The DNS A record is 192.168.99.39.
However, the actual page on the server is https://test.ntu.ac.uk/jukeboxdrm.
Can this be achieved on the A10 or is programming needed on the webserver to redirect https://test.ntu.ac.uk to https://test.ntu.ac.uk/jukeboxdrm.
Would a cname on the DNS of test.ntu.ac.uk pointing to test.ntu.ac.uk/jukeboxdrm work.
We are also doing SSL offload on the servers.
0
Comments
To achieve the 302 redirect, there are aFleX samples within the ACOS device and I have used "redirect1" as a reference. To redirect the https://test.ntu.ac.uk to https://test.ntu.ac.uk/jukeboxdrm use this sample config below:
# redirect HTTP request to https URL
when HTTP_REQUEST {
if { [HTTP::host] equals “test.ntu.ac.uk” } {
HTTP::redirect “https://test.ntu.ac.uk/jukeboxdrm/[HTTP::uri]”
}
Make sure you apply the aFleX template to the VIP to make it work.
Just to add to this, you can not use a CNAME for such an operation.
With the HTTP::redirect the AX will use a 302 by default.
When you want to redirect "permanent" with a 301 you can use something like:
when HTTP_REQUEST { if { [HTTP::host] equals "test.ntu.ac.uk” } { HTTP::respond 301 Location "https://test.ntu.ac.uk/jukeboxdrm[HTTP::uri]" } }
And when this always needs to happen, without the HOST check you can do this:
when HTTP_REQUEST { HTTP::respond 301 Location "https://test.ntu.ac.uk/jukeboxdrm[HTTP::uri]" }