amebiz_142234
Mar 14, 2018Nimbostratus
protocol and sub domain redirect
hi guys, i want to redirect like that:
http://domain.com -> https://www.domain.com
http://domain.com/something -> https://www.domain.com/something
http://www.domain.com -> https://www.domain.com
http://www.domain.com/something -> https://www.domain.com/something
is that just with one redirect possible would be nice (google ranking) any ideas?
I don't know if this is the most straightforward way of doing it or not but I hope this works for you:
when HTTP_REQUEST { switch [HTTP::host] { domain.com { HTTP::redirect "https://www.domain.com[HTTP::uri]" } www.domain.com { HTTP::redirect "https://www.domain.com[HTTP::uri]" } } }