Is there an update on subdomain matching, as yet?
Thanks,
On 7/18/06, Martel Valgoerad <[EMAIL PROTECTED]
> wrote:
Mislav Marohnić wrote:
> I needed subdomain matching for my application routes so I thought I
> need to hack into RewriteRouter or Route classes, but it turned out it
> can be easily achieved with simple subclassing! Here is how I did it.
Well done, Mislav. Thanks.
> list($subdomain,) = explode('.', $_SERVER['HTTP_HOST']);
Check which one will be faster:
$pos = strpos($_SERVER['HTTP_HOST'], '.');
$subdomain = substr($_SERVER['HTTP_HOST'], 0, $pos);
> Also I didn't want default routes RewriteRouter creates on
> initialization so I subclassed it too:
Well, I guess there should be some way to disable this for "power users" like
you. As well as with rewriteBase detection. I'll think about it.
> Are we going to see these features (subdomain, domain, HTTP method, etc.
> matching) in RewriteRouter? This could serve as an inspiration ;)
I'm a bit afraid of possible use of :subdomain variable and errors it can
generate as they may be very hard to debug. But it is definitely worth thinking
over.
> Mislav
--
Michael Minicki aka Martel Valgoerad | [EMAIL PROTECTED] | http://aie.pl/martel.asc
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Make sure you have finished speaking before your audience has finished
listening." -- Dorothy Sarnoff