Forum Moderators: phranque
Am I asking the impossible?
Welcome to WebmasterWorld!
I'm not following your usage of "interpolate" here, but generally, the problem is solvable by enclosing the optional elements and their trailing periods in parentheses and adding "?" to make that group optional, as in:
(www\.)?([^.]+)\.(st\.)?us
How you implement this depends on which parts of the domain are fixed and which are variable. If your domain taxonomy varies greatly, you may need to use multiple rules.
Jim
[httpd.apache.org...]
It doesn't appear that I have the luxury of using a regular expression to match the domain; it looks like the mod does all of that for me.
Am I forced into rewriting the 'www' back on to a URL if it's missing?