Hi,
I have around 1000 pages which is something like this-
source page- content/abc/content/at/de/test/insights/articles/equity/2020/robotics-automation-at.html
I want to implement 301 redirect
target page- content/abc/content/at/de/test/insights/articles/equity/2020/robotics-automation.html
how can I implement this.
Views
Replies
Total Likes
Hi @Anoop345
Please check below which meets your requirement.
http://www.sgaemsolutions.com/2020/01/handing-301-redirection-in-aem-using.html
Yes, I checked this link and saw below details-
Limitations of 301 Redirects in Redirect Map Manager:
301 Redirect Map is really a cool feature but it has some limitations.
RewriteRule ^/en/index(.*)html$ /en/home.html [R=301,L]
Include the file in the rewrite file of a particular website.
but my point here-
1)- Which file I need to create?
2)- I have to redirect url that has country code suffix from all the URLs to a URL without country suffix before .html
content/abc/content/at/de/test/insights/articles/equity/2020/robotics-automation-at.html
content/abc/content/au/de/test/insights/articles/equity/2020/robotics-automation-au.html
Shall I write a rewrite rule with a single regex in dispatcher file and will it work?
Hi @Anoop345 As mentioned by @Siva_Sogalapalli - This will help you out by implementing the 301 based redirects using redirect map or vanity redirect.
Implement Redirects in Dispatcher:
Implement the 301 based redirects in rewrite file under /etc/httpd/conf.d/rewrites/*
exmaple:
RewriteRule ^/content/abc/content/at/de/test/insights/articles/equity/2020/robotics-automation-at.html https://%{SERVER_NAME}/content/abc/content/at/de/test/insights/articles/equity/2020/robotics-automation.html [R=301,NC,L]
** {SERVER_NAME} - if you have variable for domain name use this variable or you can use domain name.
** Make sure to call this rewrite file in vhost file.
** check the syntax - service httpd configtest -> if syntax is OK restart the httpd service.
** You can use excel sheet to add 1000 redirects with source/destination path + Redirect flag like below:
** To test all the redirects - use macro-script in excel.
Please let us know if you have any issues post implementing the redirect.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies