Where is /etc/map on my local publishing instance?
AEM Cloud / 6.5
I am trying to set up these routing rules and behavior:
I have the content structure in place and working. I have a local authoring instance running on 4502 (quickstart jar), and I have a local publishing instance running on 4503 (quickstart jar). Authoring instance is configured to replicate to the publishing instance following the official documentaion on local runtime setup. I have a local instance of the dispatcher (running on 8080 and resolving a custom local domain), and have it configured with these rewriting rules:
```
RewriteEngine on
Include conf.d/rewrites/default_rewrite.rules
RewriteCond %{REQUEST_URI} !^/apps
RewriteCond %{REQUEST_URI} !^/bin
RewriteCond %{REQUEST_URI} !^/content
RewriteCond %{REQUEST_URI} !^/etc
RewriteCond %{REQUEST_URI} !^/home
RewriteCond %{REQUEST_URI} !^/libs
RewriteCond %{REQUEST_URI} !^/saml_login
RewriteCond %{REQUEST_URI} !^/system
RewriteCond %{REQUEST_URI} !^/tmp
RewriteCond %{REQUEST_URI} !^/var
# rewrite for root redirect to en-us/home
RewriteRule ^/$ /en-us/home/ [R=301]
# Mask the /content/mysite/ path from URLs
RewriteRule ^/content/mysite/(.*)(\.html)?$ /$1 [NE,L,R=301]
# Replace the .html with /
RewriteCond %{REQUEST_URI} \.html$
RewriteRule ^/(.*).html$ /$1/ [R=301,L,QSA]
# Append the .html for those URL’s ending with / before sending to publisher
RewriteCond %{REQUEST_URI} !^/$
RewriteRule ^/(.*)/$ /$1.html [PT,L,QSA]
```
This appears to mostly work. At least I can see content on my site through the dispatcher.
The problem I am facing comes with following these blogs/tutorials:
They recommend creating a structure under /etc/map/http to manage routing. All of this makes sense, but this is where it falls apart for me:
Any tips, pointers, links to blogs, documentation, whatever- would be extremely helpful! Thank you!
Solved! Go to Solution.
As per the latest recommendations, Sling Mappings should be created in following location:
As you would notice, you can also append a runmode. All settings defined in this path would be applicable only to that specific runmode.
I would suggest that you create the Sling Mappings only on publish and not on author. On author keeping the things OOTB help you debug content issue. Once all is fine, you can publish the content. The Sling mappings will then shorten paths for end-users
As per the latest recommendations, Sling Mappings should be created in following location:
As you would notice, you can also append a runmode. All settings defined in this path would be applicable only to that specific runmode.
I would suggest that you create the Sling Mappings only on publish and not on author. On author keeping the things OOTB help you debug content issue. Once all is fine, you can publish the content. The Sling mappings will then shorten paths for end-users
Could you please share reference document link about theSling Mappings latest recommendations?
Views
Replies
Total Likes
Can you please link to any documentation on this?
Views
Replies
Total Likes
@jdylanmc Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Views
Likes
Replies