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>
Solved! Go to Solution.
Views
Replies
Total Likes
Please try below rule once
RewriteRule /properties/(shoppingpage-pointe|the-cart)* /properties/shoppingpage-pointe-the-cart.html [R=301,L]
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
Please try below rule once
RewriteRule /properties/(shoppingpage-pointe|the-cart)* /properties/shoppingpage-pointe-the-cart.html [R=301,L]
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.
You can try
RewriteRule ^/(properties)/(shoppingpage-pointe|the-cart).html$ /$1/shoppingpage-pointe-the-cart.html [R=301,L]
@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.
Views
Replies
Total Likes
Views
Likes
Replies