I am coding a filter and want to detect if a page is in https or not.
The detection part I have figured out, it's the re-direct after
detection that I am having a little trouble with. If the filter
detects that the page is not in https and requires it, I can announce
an event in the filter, and then have that event execute the
<redirect /> directive, but not sure how to handle the transition in
protocols (http -> https) . I really do not want to hardcode the url
in the redirect directive.
Any suggestions?
As an alternative to hardcoding - you can make it a little "softer" by
having the URL in a property (that way you only need to change it in one
place, if it changes).
/Hugo
Peter, the man, already has a wonderful plugin that handles just this.
.Peter