コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.
解決済み

AEM Redirection Not working

Avatar

Level 3

Hi Team I have a requirement to redirect every requests from  https://mypage.mywebsite.com/properties/shoppingpage-pointe.html and https://mypage.mywebsite.com/properties/the-cart.html to https://mypage.mywebsite.com/properties/shoppingpage-pointe-the-cart.html

 

I tried with below code, but it is not working as expected. 

Could you please guide me on what to be done.

 

<IfModule mod_rewrite.c>
RewriteEngine On
Redirect 301 https://mypage.mywebsite.com/properties/shoppingpage-pointe.html https://mypage.mywebsite.com/properties/shoppingpage-pointe-the-cart.html
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On
Redirect 301 https://mypage.mywebsite.com/properties/the-cart.html https://mypage.mywebsite.com/properties/shoppingpage-pointe-the-cart.html
</IfModule>

1 受け入れられたソリューション

Avatar

正解者
Community Advisor

@vineetham123 

Please try below rule once

RewriteRule /properties/(shoppingpage-pointe|the-cart)* /properties/shoppingpage-pointe-the-cart.html [R=301,L]

元の投稿で解決策を見る

5 返信

Avatar

Level 6

Hi @vineetham123 

 

You can try the below rewrite rules in your rewrite rules file

 

RewriteCond %{REQUEST_URI} ^/properties/(shoppingpage-pointe|the-cart).html
RewriteRule ^/(.*)$ /properties/shoppingpage-pointe-the-cart.html  [PT,L]

 

Regards

Ayush

Avatar

正解者
Community Advisor

@vineetham123 

Please try below rule once

RewriteRule /properties/(shoppingpage-pointe|the-cart)* /properties/shoppingpage-pointe-the-cart.html [R=301,L]

Avatar

Community Advisor

Hi @vineetham123 

You can try using the following code 

<IfModule mod_rewrite.c>
RewriteRule ^properties/shoppingpage-pointe\.html$ /properties/shoppingpage-pointe-the-cart.html [R=301,L]
RewriteRule ^properties/the-cart\.html$ /properties/shoppingpage-pointe-the-cart.html [R=301,L]
</IfModule>

This code uses regular expressions to match the URLs and redirect them to the desired URL. 



Avatar

Community Advisor

You can try 

RewriteRule ^/(properties)/(shoppingpage-pointe|the-cart).html$ /$1/shoppingpage-pointe-the-cart.html [R=301,L]
Arun Patidar

AEM LinksLinkedIn

Avatar

Administrator

@vineetham123 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni