Configure Sling Mapping for Resource Resolution
Hi,
I am referring to this article http://dev.day.com/docs/en/cq/current/deploying/resource_mapping.html to configure resource mapping. I am using my publish instance with Geometrixx sites.
I created the mapping that prefixes any request to http://myserver:4503/ with /content: This works somewhat correctly. With the mapping, when I browse to http://myserver:4503, I get rerouted to http://myserver:4503/geometrixx/en/toolbar/account/login.html?resource=%2Fgeohome&$$login$$=%24%24login%24%24
The page has missing images and styles. The section "Configure Sling Mapping for Resource Resolution" in the article https://dev.day.com/docs/en/cq/current/deploying/dispatcher/disp_domains.html suggests that I look into the error.log for my publish instance to find out what other mappings I need to make. In the error.log file, I see
01.01.2014 10:55:15.516 *INFO* [137.57.102.28 [1388602515514] GET /etc/designs/default/0.gif HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /content/etc/designs/default/0.gif not found
01.01.2014 10:55:15.516 *INFO* [137.57.102.28 [1388602515514] GET /etc/designs/default/0.gif HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /content/etc/designs/default/0.gif not found
I proceeded to add the following mappings and refreshed the page.
| /etc/map/http/branda.com/etc | sling:Mapping | |
| /etc/map/http/myserver_any/etc/designs | sling:Mapping | Name: sling:internalRedirect Type: String Value: /etc/designs |
| /etc/map/http/myserver_any/etc/clientlibs | sling:Mapping | Name: sling:internalRedirect Type: String Value: /etc/clientlibs |
The log still says
01.01.2014 10:59:05.297 *INFO* [137.57.102.28 [1388602745295] GET /etc/designs/default/0.gif HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /content/etc/designs/default/0.gif not found
I checked the system/console/jcrresolver and found the following mapping map entries
| Mapping Map Entries | ||
|---|---|---|
| Lists the entries used by the ResourceResolver.map methods to map Resource Paths to URLs | ||
| Pattern | Replacement | Redirect |
| ^/etc/clientlibs/ | http://myserver:4503//etc/clientlibs/ | external: 302 |
| ^/etc/designs/ | http://myserver:4503//etc/designs/ | external: 302 |
| ^/content/ | http://myserver:4503/ | external: 302 |
| ^/libs/ | http://myserver:4503//libs/ | external: 302 |
If I edit my etc/map/http/myserver_any sling:mapping, and remove the property sling:internalRedirect to /content/, I see the site loading correctly with images and styles, but the URL now shows http://myserver:4503/content/geometrixx-outdoors/en.html. I had wanted it to only show http://myserver:4503/geometrixx-outdoors/en.html.
What am I doing wrong? Please advise.
Thank You.