【发布时间】:2015-11-11 23:54:03
【问题描述】:
我无法在 AEM 的 Dispatcher 模块上进行重写。 以下是我的配置发生的情况:
调度程序配置:
我的 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>
......
现在,如果我尝试访问 mobile.example.com.au/home.html,它会显示这个 404 并说没有内容:
找不到
请求的 URL /content/mobile/home.html 是 在此服务器上找不到。
虽然我可以使用完整路径直接点击页面: http://mobile.example.com.au/content/mobile/home.html 并呈现页面。
我在这里缺少什么?它与文档根目录有关吗?
另外,我们如何设置 mobile.example.com.au 的默认登录页面以显示 home.html。
【问题讨论】:
标签: apache content-management-system aem dispatcher