dynamic redirect

ISAPI_Rewrite is Apache mod_rewrite compatible URL rewriter for Microsoft IIS
User avatar
Posts: 1
Joined: 22 May 2012, 17:14

dynamic redirect

22 May 2012, 17:20

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

User avatar
Posts: 1264
Joined: 07 Mar 2012, 10:16

Re: dynamic redirect

23 May 2012, 07:20

Hello,

Do you want to simply remove "-ribbons"?

Code: Select all
RewriteEngine on
RewriteBase /

RewriteRule ^(.*)-ribbons\.html$ /$1.html [NC,R=301,L]


Regards
Andrew

Return to ISAPI_Rewrite 3.0

Who is online

Users browsing this forum: No registered users and 4 guests