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

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

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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -