Hi Team,
we are in AEMasCS, we are facing an issue below. We have 5 different domain url example show below as below.
below content path
/content/site-A/en/home.html
/content/site-B/en/home.html
/content/site-C/en/home.html
/content/site-D/en/home.html
/content/site-E/en/home.html
when we hit www.site-A.com/home.html - working as expected,
when we gave path and hit like www.site-A.com/content/site-B/en/home.html - it should redirect to 404(page not found) page but its rendering site-B content from site-A domain. which is wrong as per logic.
Any idea about this issue and how to solve it?
org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl.cfg.json - configuration
{
"resource.resolver.mapping": [
"/:/",
"/content/site-A/en/</",
"/content/site-B/en/</",
"/content/site-C/en/</",
"/content/site-D/en/</",
"/content/site-E/en/</"
]
}
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
For a multi-domain set-up, we should use Dispatcher rewrites.
A general flow of Dispatcher configs look like this
You would need to create separate rewrite files for each domain.
Then assure each vhost only includes the relevant rewrite file only.
JcrResourceResolverFactoryImpl would not be able to do domain->path mapping
Hi @rajat168
From rewrite rule, you can block anything which start from /content except DAM and XF.(Please check other whitelist patterns as well)
Example Rule:
# condition to handle /content except /content/dam/* and /content/experience-fragments/* and redirect to 404
RewriteCond %{REQUEST_URI} ^/content
RewriteCond %{REQUEST_URI} !^/content/dam
RewriteCond %{REQUEST_URI} !^/content/experience-fragments
RewriteRule ^/content.*$ - [R=404,L]
Hi @rajat168 ,
Kindly refer https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/dep... for resource mapping .
Thanks
@rajat168 Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
@rajat168 Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
For a multi-domain set-up, we should use Dispatcher rewrites.
A general flow of Dispatcher configs look like this
You would need to create separate rewrite files for each domain.
Then assure each vhost only includes the relevant rewrite file only.
JcrResourceResolverFactoryImpl would not be able to do domain->path mapping
thanks much for detailed explanation @aanchal-sikka
Views
Likes
Replies