MarkOly - 2:18 am on Jun 26, 2013 (gmt 0)
To me the rule says: If the request is for a named subdomain other that www or ftp or mail, then redirect to www. Come to think of it, was this rule intended for domain-name canonicalization? If so, use the ordinary
pattern. (One condition only.) I don't think you need to say anything about mail or ftp at all, unless those really are named subdomains accessed via http.
Yeah, it's for domain-name canonicalization. For some reason, I was thinking of ftp as a subdomain. So no, that's not accessed via http. But webmail is accessed via http. That's what I was thinking of when I used 'mail'. I don't really ever use the webmail. I did need it once when I couldn't access emails the normal way. So I might as well not lock myself out of it. I'll change it to (www|webmail) then.
If more than one condition has to be met, list them starting with most likely to fail. Not much use making the server run through a long list of things that apply to 1/10 of all requests if the last thing on the list only applies 1/1000 of the time.
If any one of a group of conditions has to be met, list them starting with most likely to succeed.
In each case the object is simply to let the rewrite engine finish its stuff and get out of there sooner.
Okay that makes sense. Thanks for explaining it!
In addition to none of these patterns being a clear performance winner, it's also worth mentioning that the difference between them was always measured not even in microseconds, but nanoseconds. That difference is so infinitesimally small that for all practical purposes, there is no performance difference.
That's interesting. It did make me wonder when I thought about the Hosts file software I used to use. You know, the blacklist of bad sites that are added to your Hosts file so you never access one of them on accident. That thing was gigantic, like 140,000 lines long! If I'm not mistaken, it goes through the entire list with every request. Yet the delay when loading pages was almost imperceptible. I say almost, and that's why I don't use it anymore. My 80-line rule might be spitting in the ocean. I don't know if it's apples to apples though. I'm still going to keep it light at first go just to see what happens.