url rewriting - .html is not getting appended in the URL in new AEM set-up -
we setting aem first time , facing issue urls fail have .html in it. example if url should be
http://dev.alfaromeousa.com/cars/usa/en.html
it coming
http://dev.alfaromeousa.com/cars/usa/en/
for temporary solution added below rewrite rule
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 ^(.*)$ $1.html [l,r=301]
but fails when url like
by adding .html. url turns
http://dev.abc.com/cars/usa/.html.
can please me figuring out if missed out in set-up or did wrong
the issue resolved below rewite rule :
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$1.html [p,l]
Comments
Post a Comment