I have the below requirement:
Suppose when the end user enters http://abc-123.co.in , the rewrite rule should be set in such a way that the URL is internally expanded to its home page full URL say http://abc-123.co.in/en/home.html but the full URL should not be visible on the address bar to the end user but rather be seen as http://abc-123.co.in (with .html extension and repo structure upto 'home' removed). How do we set up a rewrite rule for this?
Similarily, when the end user clicks on say, http://abc-123.co.in/en/home/about-us.html from the home page, again the full URL should not be visible to the end user but rather be seen as http://abc-123.co.in/about-us (with .html extension and repo structure upto 'home' removed). How do we set up a rewrite rule for this?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
1. add entry in resource mappings at OSGI config in AEM
/config.publish/org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl.xml
resource.resolver.mapping="[/:/,/content/myproj/en/home:/]"
2. Add Apache server rewrite rules
RewriteRule ^/$ /content/myproj/en/home.html [PT,NE,L]
RewriteRule ^/(.*)$ /content/myproj/en/home/$1 [PT,NE]
1. add entry in resource mappings at OSGI config in AEM
/config.publish/org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl.xml
resource.resolver.mapping="[/:/,/content/myproj/en/home:/]"
2. Add Apache server rewrite rules
RewriteRule ^/$ /content/myproj/en/home.html [PT,NE,L]
RewriteRule ^/(.*)$ /content/myproj/en/home/$1 [PT,NE]