dynamic redirect
2 posts
• Page 1 of 1
- seocornwall
- Posts: 1
- Joined: 22 May 2012, 17:14
dynamic redirect
What would the rule be for a dynamic redirect?
I have duplicate pages which I need to 301 redirect, for example:
www.mydomain.com/blue-ribbons-ribbons.html
which needs to 301 redirect to:
www.mydomain.com/blue-ribbons.html
I have 100's of these all with the issue of having two ribbons-ribbons within the URL, more examples:
www.mydomain.com/red-ribbons-ribbons.html
www.mydomain.com/pink-ribbons-ribbons.html
www.mydomain.com/white-ribbons-ribbons.html
Is there a rule I can use which will fix this in one hit?
thanks
I have duplicate pages which I need to 301 redirect, for example:
www.mydomain.com/blue-ribbons-ribbons.html
which needs to 301 redirect to:
www.mydomain.com/blue-ribbons.html
I have 100's of these all with the issue of having two ribbons-ribbons within the URL, more examples:
www.mydomain.com/red-ribbons-ribbons.html
www.mydomain.com/pink-ribbons-ribbons.html
www.mydomain.com/white-ribbons-ribbons.html
Is there a rule I can use which will fix this in one hit?
thanks
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: dynamic redirect
Hello,
Do you want to simply remove "-ribbons"?
Regards
Andrew
Do you want to simply remove "-ribbons"?
- Code: Select all
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)-ribbons\.html$ /$1.html [NC,R=301,L]
Regards
Andrew
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests