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):

enter image description here

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.com in 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

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -