Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

Re writing URL for website

Avatar

Level 4

how can we remove /content/myproject (example) from the url of my website

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi Subrato,

 

the simplest way to do this is to use the resource resolver for outgoing links and use Apache mod_rewrite rules for incoming rewrites(this caches to the correct location in dispatcher)

Alternatively you can use /etc/map for more complex rewriting, for example if you have multiple domains.

I'm not sure I understand the issue you are having when you sya: "but its working upto 3 levels of child page not for the entire website"  Are you saying links are not getting rendered correctly? Can you give an example of what is not working?

Regards,

Opkar

[2] http://brian-vaughn.blogspot.de/2013/12/aem-url-rewriting.html

View solution in original post

4 Replies

Avatar

Former Community Member

You can use Resource Mapping to define redirects, vanity URLs and virtual hosts for AEM. 

Check this out: http://docs.adobe.com/docs/en/cq/5-6-1/deploying/resource_mapping.html

Avatar

Level 4

I tried using etc/map node and using ResourceResolverFactory but its working upto 3 levels of child page not for the entire website.

I need the change should be applied for the entire website.

Avatar

Correct answer by
Employee

Hi Subrato,

 

the simplest way to do this is to use the resource resolver for outgoing links and use Apache mod_rewrite rules for incoming rewrites(this caches to the correct location in dispatcher)

Alternatively you can use /etc/map for more complex rewriting, for example if you have multiple domains.

I'm not sure I understand the issue you are having when you sya: "but its working upto 3 levels of child page not for the entire website"  Are you saying links are not getting rendered correctly? Can you give an example of what is not working?

Regards,

Opkar

[2] http://brian-vaughn.blogspot.de/2013/12/aem-url-rewriting.html

Avatar

Level 4

hi

Yes the actual issue is all the links in the pages are not getting rendered correctly

As u can c in the attachment 

the links in the pages of English are working fine and its navigating correctly but links in the child pages of English (eg: Contact) are not getting rendered properly.

When i click on any link in Contact page it gets navigated but it adds /content/geometrixx/ in the URL