.html 未附加到新 AEM 设置的 URL 中

.html is not getting appended in the URL in new AEM set-up

我们是第一次设置 AEM,我们面临 URLs 中没有 .html 的问题。例如,如果 URL 应该是

http://dev.alfaromeousa.com/cars/usa/en.html

它实际上是

http://dev.alfaromeousa.com/cars/usa/en/

对于临时解决方案,我们添加了以下重写规则

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g|png|js|css|swf|php|ico|txt|pdf|xml)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ - [L]
RewriteCond %{REQUEST_URI} !^.*.html$
RewriteRule ^(.*)$ .html [L,R=301] 

但是当 URL 像

时它失败了

http://dev.abc.com/cars/usa/

通过添加 .html。所以 URL 变成

http://dev.abc.com/cars/usa/.html.

任何人都可以帮我弄清楚我是否遗漏了一些设置或做错了什么

问题已通过以下重写规则解决:

RewriteCond %{REQUEST_URI} !^/aemusaerror/(.*) [NC]
RewriteCond %{REQUEST_URI} !^/content/dam(.*) [NC]
RewriteCond %{REQUEST_URI} !^/etc/designs(.*) [NC]
RewriteCond %{REQUEST_URI} !^/vl/(.*)json [NC]
RewriteCond %{REQUEST_URI} !^/timestamp [NC]
RewriteCond %{REQUEST_URI} !(.*)\.[a-zA-Z0-9-]+$
RewriteCond %{REQUEST_URI} !^/renderer/(.*) [NC]
RewriteRule ^(/.*)$ /content/alfausa/en.html [P,L]