Hi,
I need to redirect a specific page to the home page(root domain).
The current redirect for the home page that's below is working fine: Whenever I hot the domain https://www.domain.com serves the page
## Home Page
RewriteRule ^/?$ /content/appname/us/en/home.html [PT,L]
## Rewrite rules for US site root pages
RewriteRule ^/content/appname/us/en/home/(.*).html$ /$1 [R=301,L]
There are a bunch of pages that are using Core Breadcrumb component and it follows the structure of:
Home > Devices > DeviceName
When Clicking on Home it should redirect to the root (#) instead it is trying to direct to /content/appname/us/en/home.html and in turn is throwing a 404
I added the below rule to redirect to the root (#) but still no luck
## Rewrite rule for Home Page
RewriteRule /content/appname/us/en/home.html ^/$ [R=301,L]
Can someone suggest how the vice-versa of the below should be working
## Home Page
RewriteRule ^/?$ /content/appname/us/en/home.html [PT,L]
Solved! Go to Solution.
Views
Replies
Total Likes
You can try the below one also
RewriteRule ^content/appname/us/en/home.html / [R=301,L]
Also if you want to do trial and error please use the below URL
https://technicalseo.com/tools/htaccess/
Hope it helps !
Dis you try something like this:
RewriteRule ^content/appname/us/en/home\.html$ / [R=301,L]
Hi @manasabojja7,
The same problem is being discussed in here: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/reverse-mapping-in-etc-map...
You can try to a new node in /etc/map/https/www_domain_com that will map /content/appname/us/en/home.html to root (/) URL.
{
"jcr:primaryType": "sling:Mapping",
"sling:internalRedirect": "/content/appname/us/en/home.html",
"sling:match": "www.domain.com/$"
}
An example Sling mapping node definition
You can try the below one also
RewriteRule ^content/appname/us/en/home.html / [R=301,L]
Also if you want to do trial and error please use the below URL
https://technicalseo.com/tools/htaccess/
Hope it helps !
Thanks @sherinregi @EstebanBustamante
The below rule worked
RewriteRule ^content/appname/us/en/home.html / [R=301,L]
Thank you, guys, for the help!
Views
Like
Replies