AEM dispatcher works for a direct request to a file, but fails with a 404 on a request to a directory
When I go to:
www.example.com/us/index.html the request works as expected. See dispatcher log below:
[Wed Sep 02 11:48:45 2015] [D] [20333(1121016128)] Found farm website for www.example.com
[Wed Sep 02 11:48:45 2015] [D] [20333(1121016128)] checking [/us/index.html]
[Wed Sep 02 11:48:45 2015] [D] [20333(1121016128)] never flushed [/opt/example/unsecure/.stat] -> use cache [/opt/example/unsecure/us/index.html]
[Wed Sep 02 11:48:45 2015] [D] [20333(1121016128)] cache-action for [/us/index.html]: DELIVER
[Wed Sep 02 11:48:45 2015] [D] [20333(1121016128)] request declined
[Wed Sep 02 11:48:45 2015] [I] [20333(1121016128)] "GET /us/index.html" - - 0ms
However, when I go to the directory directly and not the file I get a 404:
www.example.com/us/ results in a 404. See dispatcher log below:
[Wed Sep 02 11:46:48 2015] [D] [20333(1121016128)] Found farm website for www.example.com
[Wed Sep 02 11:46:48 2015] [D] [20333(1121016128)] checking [/us/]
[Wed Sep 02 11:46:48 2015] [D] [20333(1121016128)] request URL has no extension: /us/
[Wed Sep 02 11:46:48 2015] [D] [20333(1121016128)] cache-action for [/us/]: NONE
[Wed Sep 02 11:46:48 2015] [D] [20333(1121016128)] Filter rejects: GET /us/ HTTP/1.1
[Wed Sep 02 11:46:48 2015] [I] [20333(1121016128)] "GET /us/" - - 1ms
[Wed Sep 02 11:46:48 2015] [D] [20333(1121016128)] Found farm website for www.example.com
[Wed Sep 02 11:46:48 2015] [D] [20333(1121016128)] checking [/apps/pagenotfound/404.shtml]
[Wed Sep 02 11:46:48 2015] [D] [20333(1121016128)] cache-action for [/apps/pagenotfound/404.shtml]: DELIVER
[Wed Sep 02 11:46:48 2015] [D] [20333(1121016128)] request declined
[Wed Sep 02 11:46:48 2015] [I] [20333(1121016128)] "GET /apps/pagenotfound/404.shtml" - - 0ms
[Wed Sep 02 11:46:48 2015] [D] [20333(1121016128)] Found farm website for www.example.com
[Wed Sep 02 11:46:48 2015] [D] [20333(1121016128)] checking [/apps/pagenotfound/master-app-config.html]
[Wed Sep 02 11:46:48 2015] [D] [20333(1121016128)] never flushed [/opt/example/unsecure/.stat] -> use cache [/opt/example/unsecure/apps/pagenotfound/master-app-config.html]
[Wed Sep 02 11:46:48 2015] [D] [20333(1121016128)] cache-action for [/apps/pagenotfound/master-app-config.html]: DELIVER
[Wed Sep 02 11:46:48 2015] [D] [20333(1121016128)] request declined
In my apache configuration I have DirectoryIndex index.html defined within my <Directory "/opt/example/unsecure"> section and hitting the directory was functioning before I enabled dispatcher.
Any ideas? Thanks.