On Sat, Feb 18, 2012 at 01:45:52AM +1030, David Kettler wrote:
> Hi John,
> 
> Pardon my nit-picking; I think any of the proposals will work fine.
> 
> >> > The general syntax is: define_client_redirect(name, from, to);
> 
> I wonder how often the from regexp would be used.  I notice your example
> does not, presumably because it's more reliable to match against the
> decomposed url in the function.
> 

I don't have a lot of real-world examples of useful client redirects, but
here is one where the 'from, to' style sits nicely:

  define_client_redirect("imgur",
      build_url_regexp($domain = "imgur", $path = /.*/),
      function (m) {
          return m[0].replace("//", "//i.")+".jpg";
      });

-- 
John Foerch
_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror

Reply via email to