AEM 6.2 Dispatcher rewrite rule
Hi All,
Can someone please help to overcome this rewrite rule problem? I have an Level4 category page and want to redirect to an specific page.
Below is the page hierarchy - added URL of each pages
Outdoors -> Outdoor Tools & Equipment -> Lawn Mowers -> Robotic Lawn Mowers
- First I click Outdoors page -> https://dtq.com/c/Departments
- then Outdoor Tools & Equipment page -> https://dtq.com/c/Outdoor-tools-equipment-Outdoors
- then Lawn Mowers page -> https://dtq17.com/c/Lawn-mowers-Outdoor-tools-equipment-Outdoors
- finally Robotic Lawn Mowers
When I click "Robotic Lawn Mowers" page it goes to below URL.
https://dtq.com/pl/Robotic-lawn-mowers-Lawn-mowers-Outdoor-tools-equipment-Outdoors/4294612702
What I need is, when I click "Robotic Lawn Mowers" page it should redirect to below URL. Instead of 'pl' it should redirect to 'c'
https://dtq.com/c/Robotic-lawn-mowers-Lawn-mowers-Outdoor-tools-equipment-Outdoors
Below are some sample rewrite rules which we have for l2/l3 category pages:
RewriteCond %{REQUEST_URI} ^/dtq/(mobile|desktop)/c/Departments$
RewriteRule ^/dtq/(mobile|desktop)/c/Departments$ /content/dtq/$1/en_us/Departments.$1.html [PT]
RewriteCond %{REQUEST_URI} ^/dtq/(mobile|desktop)/c/(.*)$
RewriteRule ^/dtq/(mobile|desktop)/c/(.*)$ /content/dtq/$1/en_us/Departments/$2.$1.html [PT]