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%24lo...
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.
Solved! Go to Solution.
Views
Replies
Total Likes
Hello,
Reason why it is going to that link because you are trying to redirect myserver.4503/ to /content/ and any thing without extension or "/" goes through login selector and hence you see default login page for CUG enabled resources.
Now there is two thing,
1) You want to redirect your root to some page, For that please see http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...
you have to do something like,
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:Mapping"
sling:internalRedirect="/geometrixx-outdoors/en.html"
sling:match=".*host.(4503|80)+/$"/>
2) you want to remove /content/ from url, For that configure resource resolver setting "Apache Sling Resource Resolver Factory" in host:port/system/console/configMgr and add URL mapping /:/ and /content/:/
Let me know if everything works after that.
Yogesh
Views
Replies
Total Likes
Hi Voon Siong,
Remove your current configuration and then At [1] for url mapping add /content/:/ . Verify & let us know how it goes.
For Image for form rewrite please use transformer http://helpx.adobe.com/experience-manager/kb/HowToImplementACustomRewriterTransformerFactory.html
Thanks,
Sham
Views
Replies
Total Likes
Sham HC wrote...
Hi Voon Siong,
Remove your current configuration and then At [1] for url mapping add /content/:/ . Verify & let us know how it goes.
For Image for form rewrite please use transformer http://helpx.adobe.com/experience-manager/kb/HowToImplementACustomRewriterTransformerFactory.html
Thanks,
Sham
Hi Sham,
Thank You for your reply. I removed all the configured entries and did the following
Now, when I type in http://myserver:4503, I get to http://myserver:4503/geometrixx/en/toolbar/account/login.html?resource=%2Fgeohome&$$login$$=%24%24lo..., which prompts to login. I never get the chance to login because after I dismiss the pop up box, the page refreshes. However, I see that the page is loading correctly with images. I guess that is an improvement?
Views
Replies
Total Likes
Hello,
Reason why it is going to that link because you are trying to redirect myserver.4503/ to /content/ and any thing without extension or "/" goes through login selector and hence you see default login page for CUG enabled resources.
Now there is two thing,
1) You want to redirect your root to some page, For that please see http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...
you have to do something like,
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:Mapping"
sling:internalRedirect="/geometrixx-outdoors/en.html"
sling:match=".*host.(4503|80)+/$"/>
2) you want to remove /content/ from url, For that configure resource resolver setting "Apache Sling Resource Resolver Factory" in host:port/system/console/configMgr and add URL mapping /:/ and /content/:/
Let me know if everything works after that.
Yogesh
Views
Replies
Total Likes
Views
Likes
Replies