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

AEM 6.5 | 301 Redirects in page properties

Avatar

Level 1

Hi all,

 

I would like to do 301 redirects as below

 

https://domainname.com/test to https://domainname.com/test/ 

https://domainname.com/test1 to https://domainname.com 

https://domainname.com/test1/ to https://domainname.com 

 

Is it possible to implement this on the site page properties under the 'redirects tab' in AEM 6.5? Or what is the best method to implement this?

Redirects - 301.png

 

 

Thanks,

Rose

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @jebarose_07 , Sling Redirects basically redirect internally, but it seems like you may need it in your Prod sites. For that, you need to rely on the dispatcher to rewrite rules and redirect pages. 

something similar to this.

RewriteRule ^/ /(.+)$ https://domainname.com/test1.html [L,R=301,NE]

 

Hope this helps,

~Aditya

Thanks,

Aditya Chabuku

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @jebarose_07 , Sling Redirects basically redirect internally, but it seems like you may need it in your Prod sites. For that, you need to rely on the dispatcher to rewrite rules and redirect pages. 

something similar to this.

RewriteRule ^/ /(.+)$ https://domainname.com/test1.html [L,R=301,NE]

 

Hope this helps,

~Aditya

Thanks,

Aditya Chabuku

Avatar

Employee Advisor

@jebarose_07 Consider implementing such redirects on apache/dispatcher, to avoid unnecessary request processing on the publisher, until you want your business editors to control these redirects. In this case, go with Redirect Map Manager [1] approach.

 

[1] https://adobe-consulting-services.github.io/acs-aem-commons/features/redirect-map-manager/index.html