Jace_45978
Oct 06, 2009Nimbostratus
moving redirects from server to F5 irule
I have been tasked with putting irule on F5 which should do what the server does for redirects. Conditions from 80 to 443 or from 443 to 80
How would this translate into f5 lingo?
anything to get me rolling is much appreciated!!!
if hitting the VIP on port 443:
code from web server:
RewriteCond %{SERVER_PORT} =443
RewriteCond %{REQUEST_METHOD} !^POST$
RewriteCond %{REQUEST_URI} /DealerNetwork/(.*)\.do(.*) [OR]
RewriteCond %{REQUEST_URI} /DealerNetwork/category/(.*)
RewriteCond %{THE_REQUEST} /DealerNetwork/login.do(.*)logout [OR]
RewriteCond %{REQUEST_URI} !/DealerNetwork/login.do(.*)
RewriteCond %{REQUEST_URI} !/DealerNetwork/registration.do(.*)
RewriteCond %{REQUEST_URI} !/DealerNetwork/forgotPasswd.do(.*)
RewriteCond %{REQUEST_URI} !/DealerNetwork/showProfile.do(.*)
RewriteRule ^/(.*) http://%{SERVER_NAME}/$1 [R,L]
Login, profile and registration pages should be secure. Logout is an exception
of login.do:
RewriteCond %{HTTPS} =off
RewriteCond %{SERVER_PORT} =80
RewriteCond %{REQUEST_METHOD} !^POST$
RewriteCond %{THE_REQUEST} !/DealerNetwork/login.do(.*)logout
RewriteCond %{REQUEST_URI} /DealerNetwork/login.do(.*) [OR]
RewriteCond %{REQUEST_URI} /DealerNetwork/registration.do(.*) [OR]
RewriteCond %{REQUEST_URI} /DealerNetwork/forgotPasswd.do(.*) [OR]
RewriteCond %{REQUEST_URI} /DealerNetwork/showProfile.do(.*)
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]
anything to get me rolling is much appreciated!!!