Forum Discussion
chrismckean_190
Mar 12, 2015Nimbostratus
Https redirect with exceptions not working
Hi Guys,
I was hoping someone might be able to help me. I'm trying to put an irule in that redirects all urls to https from http bar some exceptions. I've currently got the below rule (bottom...
- Mar 13, 2015
If I go to the site it redirects to https.
may the redirect be done by server?
have you ever used http analyzer tool? it may be helpful.
HttpFox
chrismckean_190
Mar 13, 2015Nimbostratus
Hi Michael, Thank you for replying. I've set that Irule you pasted but it's still not working. I can see the host is being picked up as "admin.domain.com" but the redirect doesn't work. I can't seem to get the irule to pay any attention to what it see's in the hosts field unless I am redirecting any value in there and not specifying a specific host.
Mar 13 11:22:48 ltm10200-01 info tmm1[27462]: Rule /Production/test : Host: admin.domain.com
Any ideas?
Cheers
Chris
- Michael_JenkinsMar 13, 2015CirrostratusUpdated the iRule above. Try that again. I added more logging. and copy the results to here, please.
- chrismckean_190Mar 13, 2015NimbostratusHi Michael, It still didn't work. It worked if I have /admin after the domain but did not work on domain alone. Below are the results Mar 13 12:19:08 ltm10200-01 info tmm7[27462]: Rule /Production/test_atm : Host: 'admin.domain.com' Mar 13 12:19:08 ltm10200-01 info tmm7[27462]: Rule /Production/test_atm : URI: '/admin' Mar 13 12:19:08 ltm10200-01 info tmm7[27462]: Rule /Production/test_atm : Match: host starts with 'admin' Mar 13 12:19:13 ltm10200-01 info tmm7[27462]: Rule /Production/test_atm : Host: 'admin.domain.com' Mar 13 12:19:13 ltm10200-01 info tmm7[27462]: Rule /Production/test_atm : URI: '/' Mar 13 12:19:13 ltm10200-01 info tmm7[27462]: Rule /Production/test_atm : Match: host starts with 'admin'
- Michael_JenkinsMar 13, 2015CirrostratusDo you have any other iRules or Local Traffic Policies associated with the VIP? From the logs, it looks like it's working, since the log shows it matching the host. If you have CLI access, can you run "tmsh list ltm virtual VIP_NAME" and copy your VIP config (sanitize as necessary).
- chrismckean_190Mar 13, 2015Nimbostratusltm virtual /Production/CM-test-http { destination /Production/172.27.x.x:http ip-protocol tcp mask 255.255.255.255 partition Production pool /Production/pool-http profiles { http { } tcp { } } rules { /Production/test } source 0.0.0.0/0 vlans-disabled } Cheers Michael
- Michael_JenkinsMar 13, 2015CirrostratusSo what happens when you go to that site? Does it redirect or give something like a can't connect error? Try changing the config to set SNAT to AutoMap and see if that helps
- Michael_JenkinsMar 13, 2015CirrostratusSo what happens when you go to that site? Does it redirect or give something like a can't connect error? Try changing the config to set SNAT to AutoMap and see if that helps
- chrismckean_190Mar 13, 2015NimbostratusIf I go to the site it redirects to https. I have changed the Source Address Translation to automap but I still have the same issue.
- chrismckean_190Mar 13, 2015NimbostratusIf I go to the site it redirects to https. I have changed the Source Address Translation to automap but I still have the same issue.
Recent Discussions
Related Content
Â
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects