Note: my answer comes from the python GAE, I suspect it may be applicable to php as well, but I'm not 100% certain.
I'm using a similar dispatch.yaml
, but with just the 2nd rule.
I just tested on my app that a request like example.abc.com
is sent to examplemodule and can be seen in the GAE logs for that module (it also started an instance for the module):
From this log it appears to me that example.abc.com
is actually expanded to 'example.abc.com/', which means it would be caught by your 1st rule.
First check your logs for both modules to see which one actually gets the request.
If indeed it goes to default I see a few things to try:
- adding a rule specifically for
example.abc.com/
before the one for */
- reversing the order of your 2 existing rules or even dropping the 1st rule completely (unless you really want to catch directory-only URLs from
example.abc.com
in default) - I'd leave such rules for each module config separately, not the dispatcher file.
Note: I also have the examplemodule's default handler treat an empty path request in the same manner as a request to the module's homepage to prevent a 404 (likely you need something different for php):
requested_path = self.request.path_info[1:]
if not requested_path:
requested_path = 'home.html'