ok let me try once again this link [www.mgdezigns.com/cards/festive_silver_purple_ornament_holiday_cards_postcard-239887577090743570.html]needs to be redirected to this[www.zazzle.com/festive_silver_purple_ornament_holiday_cards_postcard-239887577090743570]  OR [www.zazzle.com/239887577090743570] (both links are same and work, whichever is simpler to code)because what I have pinned to pinterest is this [www.mgdezigns.com/cards/festive_silver_purple_ornament_holiday_cards_postcard-239887577090743570.html]and it shows empty page so what i want is that the people who click on this link [www.mgdezigns.com/cards/festive_silver_purple_ornament_holiday_cards_postcard-239887577090743570.html]from pinned images at pinterest.com actually get redirected to [www.zazzle.com/festive_silver_purple_ornament_holiday_cards_postcard-239887577090743570 ] OR [www.zazzle.com/239887577090743570] (both links are same and work, whichever is simpler to code) is something like this possible? Thank You so much!You will be a life saver!
redirecting some parts of a url
htaccess;redirects;url rewriting
You could do something like the following in .htaccess to match all the cards, grabing just the number from the URL:RewriteEngine OnRewriteRule ^cards/[a-z_]+-([\d]{10,})\.html$ http://www.zazzle.com/$1 [R=301,L]To add more categories you could be explicit...RewriteRule ^(?:cards|invitations|weddings)/[a-z_]+-([\d]{10,})\.html$ http://www.zazzle.com/$1 [R=301,L]Or, be generic, to match anything in the first path segment:RewriteRule ^[a-z]+/[a-z_]+-([\d]{10,})\.html$ http://www.zazzle.com/$1 [R=301,L]In fact, you could just match any URL that ends in a hyphen followed by a long number...?RewriteRule -([\d]{10,})\.html$ http://www.zazzle.com/$1 [R=301,L]