Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Managing /etc/map on Publish instance?

Avatar

Level 2

Where is /etc/map on my local publishing instance?

 

AEM Cloud / 6.5

 

I am trying to set up these routing rules and behavior:

  • No HTML extensions
  • Remove content pathing from URL
  • Single domain (for now), language in URL as a folder. Ideally if we go multi-domain, I want links across sites to canonicalize properly and function.
  • URLs should look like:  https://<subdomain>.<domain>.com/en-us/blogs/ 

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:

  1. If I create this structure on my local authoring instance (4502), and navigate to pages on the authoring instance, URLs are being rendered correctly.
  2. /etc/map isn't under source control in the default maven template.  How should this be handled?
    1. I tried updating my filter rules to pull the /etc/map folder under source control, which worked- but then I am getting jackrabbit errors around an invalid configuration (even though it was made through the AEM CRXDE?).
  3. /etc folder doesn't exist on my local publishing instance.  When I go to create it, I get a 403 forbidden error.  Don't I need to replicate the /etc/map/http configurations to the publishing instance? How do I do this?
  4. If I create environment specific configurations, what is the "runtime mode" settings for local development?  What are they called for the cloud instances? How do you properly configure these environment specific runtime settings and store them in source control for distribution?

Any tips, pointers, links to blogs, documentation, whatever- would be extremely helpful!  Thank you!

1 Reply

Avatar

Level 2

Hi  jdylanmc

 

I have same problem, do you have any update about your situation?

Thanks.