Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Rewrite url's : Explanation needed

Avatar

Level 9

Hi All,

Have heard about url rewriting. Went through the below topics :

https://docs.adobe.com/docs/en/dispatcher/disp-domains.html

http://brian-vaughn.blogspot.in/2013/12/aem-url-rewriting.html

The above gave some inputs on this. However, could not locate any sample/example to understand this in a better way.

Any thoughts/reference on this will be helpful.

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi

You can get step by step guild at following community articles:-

Link:- http://aem.matelli.org/url-mapping-and-deep-linking/

//

sling:Mapping Redirects: AEM’s most powerful URL-manipulation feature, a set of redirect components, is often overlooked because application servers don’t traditionally have this ability. But CQ’s built in Vanity URL support, namespace mangling, and internal tools all make use of this ability. A custom application can too, for instance, by remapping all /content project to /content/myproject

In CRX, navigate to the /etc/map node.
Open (or create) the http node of type sling:Folder
Create a node called content of type sling:Mapping
Add a property called sling:match and give it a value of localhost.4502/content/
Add a property called sling:internalRedirect and give it a value of /content/myproject

Now navigate to http://localhost:4502/content/mypage.html. The browser will display the URL that was entered, but internally AEM will be referencing the mapped directory structure.

Another way to test how CQ is handling mapping is by opening the Sling Resource Resolver tool. Log in with normal admin credentials (the default being admin/admin), enter http://localhost:4502/content/mypage.html into the test box, click Resolve and examine the “path” property that is output below the test box.

 

Link:- http://brian-vaughn.blogspot.in/2013/12/aem-url-rewriting.html

Link:- http://aem-cq-tutorials.blogspot.in/2014/06/mapping-of-request-urls-in-cqaem.html

Link:- http://www.cqblueprints.com/tipsandtricks/serving-static-assets-alt-url.html

 

I hope this will help you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

View solution in original post

1 Reply

Avatar

Correct answer by
Administrator

Hi

You can get step by step guild at following community articles:-

Link:- http://aem.matelli.org/url-mapping-and-deep-linking/

//

sling:Mapping Redirects: AEM’s most powerful URL-manipulation feature, a set of redirect components, is often overlooked because application servers don’t traditionally have this ability. But CQ’s built in Vanity URL support, namespace mangling, and internal tools all make use of this ability. A custom application can too, for instance, by remapping all /content project to /content/myproject

In CRX, navigate to the /etc/map node.
Open (or create) the http node of type sling:Folder
Create a node called content of type sling:Mapping
Add a property called sling:match and give it a value of localhost.4502/content/
Add a property called sling:internalRedirect and give it a value of /content/myproject

Now navigate to http://localhost:4502/content/mypage.html. The browser will display the URL that was entered, but internally AEM will be referencing the mapped directory structure.

Another way to test how CQ is handling mapping is by opening the Sling Resource Resolver tool. Log in with normal admin credentials (the default being admin/admin), enter http://localhost:4502/content/mypage.html into the test box, click Resolve and examine the “path” property that is output below the test box.

 

Link:- http://brian-vaughn.blogspot.in/2013/12/aem-url-rewriting.html

Link:- http://aem-cq-tutorials.blogspot.in/2014/06/mapping-of-request-urls-in-cqaem.html

Link:- http://www.cqblueprints.com/tipsandtricks/serving-static-assets-alt-url.html

 

I hope this will help you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni