Rewrite url's : Explanation needed | Community
Skip to main content
New Participant
March 23, 2016
Solved

Rewrite url's : Explanation needed

  • March 23, 2016
  • 1 reply
  • 2123 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

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

1 reply

kautuk_sahni
kautuk_sahniAccepted solution
Employee
March 23, 2016

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