php - Appengine: Routing with dispatch.yaml -
i have module on appengine exmplemodule
and dispatch.yaml is
application: sampleappname dispatch: - url: "*/" module: default - url: "example.abc.com/*" module: examplemodule it working fine, when try access example.abc.com/index.php loads index.php file normally. want when should access example.abc.com index.php file should open.
how can achieve this?
ask me if of information not sufficient answer question of mine.
note: answer comes python gae, suspect may applicable php well, i'm not 100% certain.
i'm using similar dispatch.yaml, 2nd rule.
i tested on app request example.abc.com sent examplemodule , can seen in gae logs module (it started instance module):
from log appears me example.abc.com expanded 'example.abc.com/', means caught 1st rule.
first check logs both modules see 1 gets request.
if indeed goes default see few things try:
- adding rule
example.abc.com/before 1*/ - reversing order of 2 existing rules or dropping 1st rule (unless really want catch directory-only urls
example.abc.comin default) - i'd leave such rules each module config separately, not dispatcher file.
note: have examplemodule's default handler treat empty path request in same manner request module's homepage prevent 404 (likely need different php):
requested_path = self.request.path_info[1:] if not requested_path: requested_path = 'home.html' 
Comments
Post a Comment