AEM Dispatcher vhost settings with rewrite rule is not working
I am unable to get the rewrite working on Dispatcher module of AEM. Following is what's happening with my configuration:
Dispatcher configuration (I am using this approach https://docs.adobe.com/docs/en/dispatcher/disp-domains.html#The Web Server Rewrites Incoming URLs):
Snippet of my httpd.conf
LoadModule dispatcher_module modules/mod_dispatcher.so <IfModule disp_apache2.c> DispatcherConfig conf/dispatcher.any DispatcherLog logs/dispatcher.log DispatcherLogLevel 3 DispatcherNoServerHeader 0 DispatcherDeclineRoot 0 DispatcherUseProcessedURL 0 DispatcherPassError 0 </IfModule> <VirtualHost *:80> ServerName mobile.example.com.au DocumentRoot "/var/www/html/content/mobile" RewriteEngine on RewriteRule ^/(.*)\.html$ /content/mobile/$1.html [PT] <Directory "/var/www/html/content/mobile"> <IfModule disp_apache2.c> SetHandler dispatcher-handler ModMimeUsePathInfo On </IfModule> Options FollowSymLinks AllowOverride None # AddType text/html .html # AddOutputFilter INCLUDES .html # Options +Includes </Directory> </VirtualHost> ......Now, if I try to access the mobile.example.com.au/home.html, it shows up this 404 and says no content:
Now, if I try to access the mobile.example.com.au/home.html, it shows up this 404 and says no content:
Not Found
The requested URL /content/mobile/home.html was not found on this server.
Though I am able to hit the page directly by using the full path:http://mobile.example.com.au/content/mobile/home.html and the page is rendered.
What am I missing here? Is it something to do with the Document root?
Also, how do we set the default landing page for mobile.example.com.au to show up home.html.